Part Number Hot Search : 
HG62E11 1905X353 1SS199TE 1N5247B 1N5247B 5020BVR PROTO 1N5247B
Product Description
Full Text Search
 

To Download MT9D111 Datasheet File

  If you can't view the Datasheet, Please click here to try to view without PDF Reader .  
 
 


  Datasheet File OCR Text:
  MT9D111 - 1/3.2-inch 2-megapixel soc digital image sensor features micron confidential and proprietary pdf: 09005aef8202ec2e/source: 09005aef8202ebf7 micron technology, inc., reserves the right to change products or specifications without notice. MT9D111__1_rev5.fm - rev. b 2/06 en 1 ?2004 micron technology, inc. all rights reserved. products and specifications discussed herein ar e subject to change by micron without notice . 1/3.2-inch system-on-a-chip (soc) cmos digital image sensor MT9D111 features ? digitalclarity? cmos imaging technology ? superior low-light performance ? ultra-low-power, low-cost ? internal master clock generated by on-chip phase- locked loop oscillator (pll) ? electronic rolling shutter (ers), progressive scan ? integrated image flow processor (ifp) for single-die camera module ? automatic image correction and enhancement, including lens shading correction ? arbitrary image decimati on with anti-aliasing ? integrated real-time jpeg encoder ? integrated microcontroller for flexibility ? two-wire serial interface providing access to registers and microcontroller memory ? selectable output data format: itu-r bt.601 (ycbcr), 565rgb, 555rgb, 444rgb, jpeg 4:2:2, jpeg 4:2:0, and raw 10-bit ? output fifo for data rate equalization ?programmable i/o slew rate ? xenon and led flash support with fast exposure adaptation ? flexible support for external auto focus, optical zoom, and mechanical shutter applications ? cellular phones ?pc cameras ?pdas ordering information table 1: key performance parameters parameter value optical format 1/ 3.2-inch (4:3) full resolution 1,600 x 1,200 pixels (uxga) pixel size 2.8m x 2.8m active pixel array area 4.73mm x 3.52mm shutter type electronic rolling shutter (ers) with global reset maximum frame rate 15 fps at full resolution, 30 fps in preview mode, (800 x 600) maximum data rate/ master clock 80 mb/s 6 mhz to 80 mhz supply voltage analog 2.5v ? 3.1v digital 1.7v ? 1.95v i/o 1.7v ? 3.1v pll 2.5v ? 3.1v adc resolution 10-bit, on-die responsivity 1.0/ lux-sec (550nm) dynamic range 71db snr max 42.3db power consumption 348mw at 15 fps, full resolution 223mw at 30 fps, preview mode operating temperature -30c to +70c package bare die, 64-ball icsp table 2: available part numbers part number description MT9D111 64-ball icsp MT9D111d00stck15lc1 bare die MT9D111w00stck15lc1 wafer www.datasheet.co.kr datasheet pdf - http://www..net/
pdf: 09005aef8202ec2e/source: 09005aef8202ebf7 micron technology, inc., reserves the right to change products or specifications without notice. MT9D111_rev5toc.fm - rev. a 2/06 en 2 ?2004 micron technology, inc. all rights reserved. MT9D111 - 1/3.2-inch 2-megapixel soc digital image sensor table of contents micron confidential and proprietary table of contents features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .1 applications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .1 ordering information. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .1 general description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9 feature overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9 typical connection. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 ballout and interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 architecture overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 sensor core . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 color pipeline . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 test pattern. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 black level conditioning and digi tal gain . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 lens shading correction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 line buffers. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 defect correction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 color interpolation and edge detection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 color correction and aperture correction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 gamma correction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 yuv processing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 image cropping and decimation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 yuv-to-rgb/yuv conversion and output formatting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 jpeg encoder and fifo . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 jpeg encoding highlights . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 output buffer overflow prevention. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 output interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 control (two-wire serial interface) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 auto focus . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 algorithm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 modes. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 lens actuator interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22 context and operational modes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22 auto exposure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 preview mode. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 scene evaluative algorithm. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24 auto white balance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24 flicker detection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24 registers and variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 how to access . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 special function registers (sfr) and mcu sram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26 registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 sensor core registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 ifp registers, page 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43 ifp registers, page 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52 jpeg indirect registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66 firmware driver variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68 monitor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69 sequencer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70 www.datasheet.co.kr datasheet pdf - http://www..net/
pdf: 09005aef8202ec2e/source: 09005aef8202ebf7 micron technology, inc., reserves the right to change products or specifications without notice. MT9D111_rev5toc.fm - rev. a 2/06 en 3 ?2004 micron technology, inc. all rights reserved. MT9D111 - 1/3.2-inch 2-megapixel soc digital image sensor table of contents micron confidential and proprietary auto exposure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75 auto white balance. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77 flicker detection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80 auto focus . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82 auto focus mechanics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85 context. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92 jpeg . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97 histogram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98 mcu register list and memory map . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99 memory map . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99 special function registers - system . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100 math co-processor operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102 jpeg indirect registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103 special function registers - gpio . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103 output format and timing. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 110 yuv/rgb uncompressed output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 110 uncompressed yuv/rgb data ordering . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111 uncompressed 10-bit bypass output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112 jpeg compressed output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112 color conversion formulas . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115 y'cb'cr' itu-r bt.601 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115 y'u'v' . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115 y'cb'cr using srgb formulas . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115 y'u'v' using srgb formulas . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115 sensor core. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 116 introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 116 pixel array structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 117 default readout order . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 118 raw data format . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 118 raw data timing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119 registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121 double-buffered registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121 bad frames . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121 changes to integration time . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121 changes to gain settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 122 feature description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123 pll generated master clock . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123 pll setup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123 pll power-up . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123 window control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 124 window start . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 124 window size . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 124 pixel border . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 124 readout modes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 124 readout speeds and power savings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 124 column mirror image. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 124 row mirror image . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 124 column and row skip . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 125 digital zoom. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 127 binning . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 127 binning limitations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 127 frame rate control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 128 minimum horizontal blanking . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 128 www.datasheet.co.kr datasheet pdf - http://www..net/
pdf: 09005aef8202ec2e/source: 09005aef8202ebf7 micron technology, inc., reserves the right to change products or specifications without notice. MT9D111_rev5toc.fm - rev. a 2/06 en 4 ?2004 micron technology, inc. all rights reserved. MT9D111 - 1/3.2-inch 2-megapixel soc digital image sensor table of contents micron confidential and proprietary minimum row time requirement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 128 context switching . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 129 integration time. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 130 maximum shutter delay . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 130 flash strobe . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 131 global reset. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 132 analog signal path . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 132 stage-by-stage transfer functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 133 v refd . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 133 gain settings: g1, g2, g3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 133 offset voltage: v offset . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 134 recommended gain settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 134 analog inputs ain1?ain3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 134 firmware . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 136 overview of architecture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 136 bootstrap routine . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 136 drivers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 136 extending and overriding drivers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 137 variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 137 uploading custom code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 137 hardware resource programming . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 137 sleep and wakeup programming . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 138 two-wire serial interface programming . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 138 dma programming . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 138 warm restarts and watchdog programming . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 138 high-precision timer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 139 safe and test modes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 139 application scheduling. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 139 monitor driver . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 139 sequencer driver . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 140 flash types and settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 141 low-light operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 142 firmware . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 143 auto exposure driver . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 143 evaluative auto exposure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 143 auto white balance driver . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 143 auto focus driver. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 144 auto focus mechanics driver . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 145 mode driver. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 145 histogram driver . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 146 flicker avoidance driver. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 146 jpeg driver . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 147 usage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 147 table programming . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 147 error handling and handshaking . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 148 start-up and usage. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 148 power-up . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 149 power-down . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 149 hard reset sequence. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 149 soft reset sequence . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 150 enable pll . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 150 configure pad slew . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 151 configure preview mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 151 www.datasheet.co.kr datasheet pdf - http://www..net/
pdf: 09005aef8202ec2e/source: 09005aef8202ebf7 micron technology, inc., reserves the right to change products or specifications without notice. MT9D111_rev5toc.fm - rev. a 2/06 en 5 ?2004 micron technology, inc. all rights reserved. MT9D111 - 1/3.2-inch 2-megapixel soc digital image sensor table of contents micron confidential and proprietary configure capture mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 151 perform lock or capture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 151 standby sequence . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 151 to enter standby . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 151 to exit standby . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 152 standby hardware configuration. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 153 output enable control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 153 contrast and gamma settings. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 154 s-curve . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 154 auto exposure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 157 preview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 157 evaluative . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 157 exposure control. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 157 lens correction zones . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 158 lens correction procedure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 159 color correction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 160 decimator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 161 general purpose i/o. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 162 introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 162 gpio output control overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 162 waveform programming . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 163 notification signals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 165 digital and analog inputs. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 165 gpio software drivers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 166 auto focus . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 166 algorithm description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 166 evaluation of image sharpness . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 172 spectral characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 175 die outline. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 175 electrical specifications. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 176 i/o timing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 178 packaging . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 179 appendix a: two-wire serial register interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 180 protocol . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 180 sequence . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 180 bus idle state . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 181 start bit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 181 stop bit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 181 slave address. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 181 data bit transfer. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 181 acknowledge bit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 182 no-acknowledge bit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 182 page register . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 182 sample write and read sequences . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 182 16-bit write sequence . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 182 16-bit read sequence. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 183 8-bit write sequence . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 183 8-bit read sequence . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 183 revision history. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 186 www.datasheet.co.kr datasheet pdf - http://www..net/
pdf: 09005aef8202ec2e/source: 09005aef8202ebf7 micron technology, inc., reserves the right to change products or specifications without notice. MT9D111_rev5lof.fm - rev. a 2/06 en 6 ?2004 micron technology, inc. all rights reserved. MT9D111 - 1/3.2-inch 2-megapixel soc digital image sensor list of figures micron confidential and proprietary list of figures figure 1: typical configuration (connection) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .10 figure 2: ball assignment. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .11 figure 3: block diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .13 figure 4: color pipeline . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .14 figure 5: jpeg encoder block diag ram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .18 figure 6: timing of decimated uncompressed output bypassing the fifo . . . . . . . . . . . . . . . . . . . . . . . . . . . 110 figure 7: timing of uncompressed full frame output or decimated output passing through the fifo . 110 figure 8: details of uncompressed yuv/rgb output timing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111 figure 9: example of timing for non- decimated uncompressed output bypa ssing output fifo . . . . . . . 112 figure 10: timing of jpeg compre ssed output in free-running clock mode . . . . . . . . . . . . . . . . . . . . . . . . . . 114 figure 11: timing of jpeg compressed output in gated clock mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 114 figure 12: timing of jpeg compressed output in spoof mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 114 figure 13: sensor core block diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 116 figure 14: pixel array . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 117 figure 15: pixel color pattern detail (top right corner) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 117 figure 16: imaging a scene . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 118 figure 17: spatial illustration of image readout . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 118 figure 18: pixel data timing example. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119 figure 19: row timing and frame_valid/line_valid signals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119 figure 20: 6 pixels in normal and column mirror readout modes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 125 figure 21: 6 rows in normal and row mirror readout modes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 125 figure 22: 8 pixels in normal and column skip 2x readout mode s . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 126 figure 23: 16 pixels in normal and column skip 4x readout mode s. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 126 figure 24: 32 pixels in normal and column skip 8x readout mode s. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 126 figure 25: 64 pixels in normal and column skip 16x readout mode s. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 127 figure 26: xenon flash enabled . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 131 figure 27: led flash enabled . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 131 figure 28: led flash enabled, using restar t. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 131 figure 29: global reset operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 132 figure 30: analog readout channel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 133 figure 31: timing diagram ain1?ain3 sample . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 135 figure 32: sequencer driver . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 140 figure 33: power on/off sequence . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 150 figure 34: hard standby sequence . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 153 figure 35: gamma correction curve . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 154 figure 36: contrast ?s? curve . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 155 figure 37: tonal mapping . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 156 figure 38: contrast diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 156 figure 39: gain vs. exposure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 158 figure 40: lens correction zones. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 159 figure 41: examples of gpio-generated wave forms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 164 figure 42: search for best focus . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 167 figure 43: scene with two potential focus targets at differen t distances from camera . . . . . . . . . . . . . . . . 170 figure 44: dependence of luminance-normalized local sharpness scores on lens position 171 figure 45: example of position weight histogram created by af driver . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 171 figure 46: auto focus windows . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 173 figure 47: computation of sharpness scores and luminance average for an af window174 figure 48: typical spectral char acteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 175 figure 49: optical center offset . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 175 figure 50: i/o timing diagram. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 178 figure 51: 64-ball icsp package mechanical drawing. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 179 figure 52: write timing to r0x 09:0?value 0x0284 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 182 figure 53: read timing from r0x09:0; returned value 0x0284 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 183 figure 54: write timing to r0x 09:0?value 0x0284 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 183 www.datasheet.co.kr datasheet pdf - http://www..net/
pdf: 09005aef8202ec2e/source: 09005aef8202ebf7 micron technology, inc., reserves the right to change products or specifications without notice. MT9D111_rev5lof.fm - rev. a 2/06 en 7 ?2004 micron technology, inc. all rights reserved. MT9D111 - 1/3.2-inch 2-megapixel soc digital image sensor list of figures micron confidential and proprietary figure 55: read timing from r0x09:0; returned value 0x0284 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 184 figure 56: two-wire serial bus timing parameters. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 184 www.datasheet.co.kr datasheet pdf - http://www..net/
pdf: 09005aef8202ec2e/source: 09005aef8202ebf7 micron technology, inc., reserves the right to change products or specifications without notice. MT9D111_rev5lot.fm - rev. a 2/06 en 8 ?2004 micron technology, inc. all rights reserved. MT9D111 - 1/3.2-inch 2-megapixel soc digital image sensor list of tables micron confidential and proprietary list of tables table 1: key performance parameters. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .1 table 2: available part numbers. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .1 table 3: signal description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .12 table 4: sensor core register defaults . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .27 table 5: sensor register description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .29 table 6: ifp registers, page 1. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .43 table 7: ifp registers, page 2. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .52 table 8: jpeg indirect registers (see regist ers 30 and 31, page 2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .66 table 9: drivers ids . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .68 table 10: driver variables-monitor driver (id = 0) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .69 table 11: driver variables-sequencer driver (id = 1) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .70 table 12: driver variables-auto exposure driver (id = 2). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .75 table 13: driver variables-auto white balance (id = 3) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .77 table 14: driver variables-flicker detection driver (id = 4) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .80 table 15: driver variables-auto focus driver (id = 5) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .82 table 16: driver variables-auto focus mechanics driver (id = 6) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .85 table 17: driver variables-mode/context driver (id = 7). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .92 table 18: driver variables-jpeg driver (id = 9) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .97 table 19: driver variables-histogram driver (id = 11) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .98 table 20: memory map . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .99 table 21: special function register list . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100 table 22: math co-processor. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102 table 23: gpio registers. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103 table 24: ycrcb output data ordering. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111 table 25: rgb ordering in default mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111 table 26: 2-byte rgb format. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112 table 27: frame time . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 120 table 28: frame?long integration time. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 120 table 29: frequency parameters. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123 table 30: skip values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 125 table 31: row addressing. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 127 table 32: column addressing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 127 table 33: minimum horizontal blanking parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 128 table 34: minimum row time parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 129 table 35: offset gain . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 134 table 36: recommended gain settings. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 134 table 37: flash types and settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 141 table 38: output enable control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 153 table 39: gamma settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 154 table 40: contrast values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 155 table 41: examples of af filters that can be programmed into th e MT9D111. . . . . . . . . . . . . . . . . . . . . . . . . . 174 table 42: ac electrical characte ristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 176 table 43: dc electrical definitions and char acteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 177 table 44: absolute maximum ratings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 178 table 45: slave address options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 181 table 46: two-wire serial bus char acteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 185 www.datasheet.co.kr datasheet pdf - http://www..net/
pdf: 09005aef8202ec2e/source: 09005aef8202ebf7 micron technology, inc., reserves the right to change products or specifications without notice. MT9D111__2_rev5.fm - rev. b 2/06 en 9 ?2004 micron technology, inc. all rights reserved. MT9D111 - 1/3.2-inch 2-megapixel soc digital image sensor general description micron confidential and proprietary general description micron ? imaging MT9D111 is a 1/3.2 inch 2-mega pixel cmos image sensor with an integrated advanced camera system. the camera system features a microcontroller (mcu) and a sophisticated image flow processor (ifp) with a real-time jpeg encoder. it also includes a programmable general purpose i/o module (gpio), which can be used to control external auto focus, op tical zoom, or mechanical shutter. the microcontroller manages all components of the camera system and sets key opera- tion parameters for the sensor core to opti mize the quality of raw image data entering the ifp. the sensor core consists of an active pixel array of 1668 x 1248 pixels, program- mable timing and control circuitry including a pll and external flash support, analog signal chain with automatic offset correcti on and programmable gain, and two 10-bit a/ d converters (adc). the entire system-on- a-chip (soc) has ultra-low power require- ments and superior low-light performance that is particularly suitable for mobile appli- cations. the excellent low-light performance of MT9D111 is one of the hallmarks of digitalclar- ity??micron's breakthrough low-noise cmos imaging technology that achieves ccd image quality (based on signal-to-noise ratio and low-light sensitivity) while maintain- ing the inherent size, cost, power consumpt ion, and integration advantages of cmos. feature overview the MT9D111 is a color image sensor with a bayer color filter arrangement. its basic characteristics are described in table 1, "key performance parameters," on page 1. the MT9D111 has an embedded phase-locked l oop oscillator (pll) that can be used with the common wireless system clock. when in use, the pll adjusts the incoming clock frequency, allowing the MT9D111 to run at almost any desired resolution and frame rate. to reduce power consumption, the pll can be bypassed and powered down. low power consumption is a very important re quirement for all components of wireless devices. the MT9D111 has numerous power conserving features, including an ultra-low power standby mode and the ability to indivi dually shut down un used digital blocks. another important consideration for wireless devices is their electromagnetic emission or interference (emi). the MT9D111 has a prog rammable i/o slew rate to minimize its emi and an output fifo to eliminate output data bursts. the advanced ifp and flexible programmability of the MT9D111 provide a variety of ways to enhance and optimize the image se nsor performance. built-in optimization algorithms enable the MT9D111 to operate at factory settings as a fully automatic, highly adaptable camera. however, most of its settings are user-programmable. www.datasheet.co.kr datasheet pdf - http://www..net/
pdf: 09005aef8202ec2e/source: 09005aef8202ebf7 micron technology, inc., reserves the right to change products or specifications without notice. MT9D111__2_rev5.fm - rev. b 2/06 en 10 ?2004 micron technology, inc. all rights reserved. MT9D111 - 1/3.2-inch 2-megapixel soc digital image sensor typical connection micron confidential and proprietary typical connection figure 1: typical configuration (connection) note: 1. resistor value 1.5k is recommended, but may be grea ter for slower two-wire speed. 2. rsvd must be connected to digita l ground for normal device operation. 3. see ?standby hardware configuration? on page 153. 4. all power supply pads must be used. v dd v aa 10f 1.5k 1 1.5k 1 s tandby s data sc lk re s et# r s vd 2 frame_valid pix c lk line_valid d out 0-d out 7 c lkin s addr 1k a g nd d g nd ain1 ain2 ain3 v dd q v dd g pio 4 v dd q 4 v dd 4 v dd pll 4 v aa 4 to c mo s c amera port 3 two-wire s erial bus 6 mhz?80 mhz c lo c k g pio[10:0] fla s h/ g pio11 to xenon or led flash 3 to a/f, zoom, an d s hutter me c hani c s 3 vaapix 4 v dd pll www.datasheet.co.kr datasheet pdf - http://www..net/
pdf: 09005aef8202ec2e/source: 09005aef8202ebf7 micron technology, inc., reserves the right to change products or specifications without notice. MT9D111__2_rev5.fm - rev. b 2/06 en 11 ?2004 micron technology, inc. all rights reserved. MT9D111 - 1/3.2-inch 2-megapixel soc digital image sensor ballout and interface micron confidential and proprietary ballout and interface figure 2: ball assignment note: all power supply pads must be used. a b c d e f g h top view (ball down) 2 d out 4 v dd d out 3 d out 2 g pio8 g pio9 v dd g pio10 3 v dd q d out 0 d g nd d out 1 g pio7 d g nd g pio 6 v dd g pio 1 v dd d out 7 d out 6 d out 5 d g nd fla s h r s vd v dd 4 frame_ line_ pix c lk d g nd d g nd g pio5 g pio4 g pio3 6 v dd q n c n c d g nd d g nd d g nd ain1 v dd g pio 5 s data s c lk s addr d g nd d g nd g pio2 g pio1 g pio0 by 7 n c n c v dd re s et# s tandy- ain2 v aa vaapix valid valid 8 v dd c lkin d g nd v dd pll a g nd ain3 a g nd v aa www.datasheet.co.kr datasheet pdf - http://www..net/
pdf: 09005aef8202ec2e/source: 09005aef8202ebf7 micron technology, inc., reserves the right to change products or specifications without notice. MT9D111__2_rev5.fm - rev. b 2/06 en 12 ?2004 micron technology, inc. all rights reserved. MT9D111 - 1/3.2-inch 2-megapixel soc digital image sensor ballout and interface micron confidential and proprietary note: 1. see ?standby hardware configuration? on page 153. table 3: signal description name type description note clkin input master clock signal (can either driv e the on-chip pll or bypass it). reset# input master reset signal, active low. standby input controls sensor?s standby mode. rsvd input reserved for factory test. tie to di gital ground during normal operation. ain1 input analog sampling and test. during normal operation, can be used to feed an external analog signal to an adc in the sensor core , in order to have the signal sampled during horizontal blan king times and stored in a register. ain2 input analog sampling and test. can be used like ain1 during normal operation. ain3 input analog sampling and test. can be used like ain1 during normal operation. sclk input two-wire serial interface clock. s addr input selects device address for the two-wire serial interface. the address is 0x90 when s addr is tied low, 0xba if tied high. see also r0x0d:0[10]. d out 0-d out 7 input eight-bit image data output or most si gnificant bits (msb) of 10-bit sensor bypass mode. 1 frame_valid input identifies rows in the active image. 1 line_valid input identifies lines in the active image. 1 pixclk input pixel clock. to be used for sampling d out , frame_valid, and line_valid. 1 s data i/o two-wire serial interface data. gpio[7:0] i/o general purpose digital i/o. each bit can be independently configured as an input or output. outputs are controlled by register-programmable waveform generator or by writing to registe rs gpio_data_l and gpio_data_h. inputs can be sensed by read ing the same registers. 1 flash/gpio11 i/o gpio11 or signal to control xenon or led flash. 1 gpio10/strobe i/o gpio10 or signal to con trol mechanical shutter. 1 gpio9/d out _lsb i/o gpio9 during normal ifp operation or data bit 1 in 10-bit sensor bypass mode. 1 gpio8d out _lsb0 i/o gpio8 during normal ifp operation or data bit 0 in 10-bit sensor bypass mode. 1 v dd supply digital power (1.8v). v dd pll supply pll power (2.8v). v aa supply analog power (2.8v). vaapix supply pixel array power (2.8v). v dd q supply i/o power (nominal 1.8v or 2.8v). v dd gpio supply i/o power for gpio (nominal 1.8v or 2.8v). a gnd supply analog ground. d gnd supply digital, i/o, and pll ground. nc ? no connect. www.datasheet.co.kr datasheet pdf - http://www..net/
pdf: 09005aef8202ec2e/source: 09005aef8202ebf7 micron technology, inc., reserves the right to change products or specifications without notice. MT9D111__2_rev5.fm - rev. b 2/06 en 13 ?2004 micron technology, inc. all rights reserved. MT9D111 - 1/3.2-inch 2-megapixel soc digital image sensor architecture overview micron confidential and proprietary architecture overview figure 3: block diagram sensor core the MT9D111 sensor core is based on micron?s mt9d011, a stand-alone, 2-megapixel cmos image sensor with a 2.8m pixel size. both image sensors have the same optical size (1/3.2 inches) and maximum resolution (uxga). like the mt9d011, the MT9D111 sensor core includes a phase-locked loop osci llator (pll), to facilitate camera integra- tion and minimize the system cost for wire less and mobile applications. when in use, the pll generates internal master clock sign al whose frequency can be set higher than the frequency of external clock signal clki n. this allows the MT9D111 to run at any desired resolution and frame rate up to th e specified maximum values, irrespective of the clkin frequency. interpolation line buffers other jpe g memories jpe g line buffers de c imator line buffers s ensor c ore c olor pipeline jpe g rom mi c ro- c ontroller s ram f i f o s tats en g ine pll internal re g ister bus ima g e flow pro c essor www.datasheet.co.kr datasheet pdf - http://www..net/
pdf: 09005aef8202ec2e/source: 09005aef8202ebf7 micron technology, inc., reserves the right to change products or specifications without notice. MT9D111__2_rev5.fm - rev. b 2/06 en 14 ?2004 micron technology, inc. all rights reserved. MT9D111 - 1/3.2-inch 2-megapixel soc digital image sensor architecture overview micron confidential and proprietary color pipeline figure 4: color pipeline test pattern during normal operation of MT9D111, a stream of raw image data from the sensor core is continuously fed into the color pipeline. fo r test purposes, this st ream can be replaced with a fixed image generated by a special test module in the pipeline. the module pro- vides a selection of test patterns suffic ient for basic testing of the pipeline. test pattern line buffers lens s ha d in g c orre c tion with di g ital g ain di g ital g ain defe c t c orre c tion bla c k level s u b tra c tion interpolation an d e dg e dete c tion de c imator yuv pro c essin g g amma c orre c tion yuv-to-r g b/yuv c onversion cc m an d aperture c orre c tion format output auto fo c us s tatisti c s histo g ram ae s tatisti c s white balan c e s tatisti c s fli c ker s tatisti c s mea s urement en g ine data, s yn c in data, s yn c out www.datasheet.co.kr datasheet pdf - http://www..net/
pdf: 09005aef8202ec2e/source: 09005aef8202ebf7 micron technology, inc., reserves the right to change products or specifications without notice. MT9D111__2_rev5.fm - rev. b 2/06 en 15 ?2004 micron technology, inc. all rights reserved. MT9D111 - 1/3.2-inch 2-megapixel soc digital image sensor architecture overview micron confidential and proprietary black level conditioning and digital gain image stream processing starts with black level conditioning and multiplication of all pixel values by a programmable digital gain. lens shading correction inexpensive lenses tend to produce images whose brightness is significantly attenuated near the edges. chromatic aberration in such lenses can cause color variation across the field of view. there are also other factors causing fixed-pattern signal gradients in images captured by image sensors. the cumulative result of all these factors is known as lens shading. the MT9D111 has an embedded lens shading correction (lc) module that can be programmed to precisely counter the shading effect of a lens on each rgb color sig- nal. the lc module multiplies rgb signals by a 2-dimensional correction function f(x,y), whose profile in both x and y direction is a piecewise quadratic polynomial with coefficients independently programmable for each direction and color. line buffers several data processing steps following the lens shading correction require access to pixel values from up to 8 consecutive image lines. for these lines to be simultaneously available for processing, they must be buffered. the ifp includes a number of sram line buffers that are used to perform defect co rrection, color interpolation, image decima- tion, and jpeg encoding. defect correction the ifp performs on-the-fly defect correction that can mask pixel array defects such as high-dark-current (?hot?) pixels and pixels th at are darker or brighter than their neigh- bors due to photoresponse non uniformity. the defect correction algorithm uses several pixel features to distinguish between normal and defective pixels. after identifying the latter, it replaces their actual values with values inferred from the values of nearest same- color neighbors. color interpolation and edge detection in the raw data stream fed by the sensor core to the ifp, each pixel is represented by a 10- bit integer number, which, to make things si mple, can be considered proportional to the pixel?s response to a one-color light stimulus, red, green or blue, depending on the pixel?s position under the color filter array. initial da ta processing steps, up to and including the defect correction, preserve the 1-color-per-pixel nature of the data stream, but after the defect correction it must be converted to a 3-colors-per-pixel stream appropriate for standard color processing. the conversion is done by an edge-sensitive color interpola- tion module. the module pads the incomplete color information available for each pixel with information extracted from an appropri ate set of neighboring pixels. the algorithm used to select this set and extract the in formation seeks the best compromise between maintaining the sharpness of the image and filtering out high-frequency noise. the sim- plest interpolation algorithm is to sort the ne arest 8 neighbors of every pixel into 3 sets, red, green, and blue, discard the set of pixels of the same color as the center pixel (if there are any), calculate average pixel values for the remaining 2 sets, and use the averages in lieu of the missing color data for the cent er pixel. such averaging reduces high-fre- quency noise, but it also blurs and distorts sharp transitions (edges) in the image. to avoid this problem, the interp olation module performs edge detection in the neighbor- hood of every processed pixel and, depending on its results, extracts color information from neighboring pixels in a number of different ways. in effect, it does low-pass filtering in flat-field image areas and avoids doing it near edges. www.datasheet.co.kr datasheet pdf - http://www..net/
pdf: 09005aef8202ec2e/source: 09005aef8202ebf7 micron technology, inc., reserves the right to change products or specifications without notice. MT9D111__2_rev5.fm - rev. b 2/06 en 16 ?2004 micron technology, inc. all rights reserved. MT9D111 - 1/3.2-inch 2-megapixel soc digital image sensor architecture overview micron confidential and proprietary color correction and aperture correction in order to achieve good color fidelity of ifp output, interpolated rgb values of all pixels are subjected to color correction. the ifp multiplies each vector of three pixel colors by a 3 x 3 color correction matrix. the three components of the resulting color vector are all sums of three 10-bit numbers. since such sums can have up to 12 significant bits, the bit width of the image data stream is widened to 12 bits per color (36 bits per pixel). the color correction matrix can be either programmed by the user or automatically selected by the auto white balance (awb) algorithm implemented in the ifp. color correction should ideally produce output colors that ar e independent of the spectral sensitivity and color cross-talk characteristics of the image sensor. the optimal values of color correc- tion matrix elements depend on those sens or characteristics and on the spectrum of light incident on the sensor. to increase image sharpness, a programmable aperture correction is applied to color corrected image data, equally to each of the 12-bit r, g, and b color channels. gamma correction like the aperture correction, gamma correction is applied equally to each of the 12-bit r, g, and b color channels. gamma correction curve is implemented as a piecewise linear function with 19 knee points, taking 12-b it arguments and mappin g them to 8-bit out- put. the abscissas of the knee points are fixed at 0, 64, 128, 256, 512, 768, 1024, 1280, 1536, 1792, 2048, 2304, 2560, 2816, 3072, 3328, 3584, 3840, and 4095. the 8-bit ordinates are programmable via ifp registers or public variables of mode driver (id = 7). the driver variables include two arrays of knee poin t ordinates defining two separate gamma curves for sensor operation contexts a and b. yuv processing after the gamma correction, the image data stream undergoes rgb to yuv conversion and optionally further corrective processing. the first step in this processing is removal of highlight coloration, also referred to as ?col or kill.? it affects only pixels whose bright- ness exceeds a certain pre-programmed threshold. the u and v values of those pixels are attenuated proportionally to the differen ce between their brightness and the thresh- old. the second optional pr ocessing step is noise supp ression by 1-dimensional low- pass filtering of y and/or uv signals. a 3- or 5-tap filter can be selected for each signal. image cropping and decimation to ensure that the size of images output by MT9D111 can be tailored to the needs of all users, the ifp includes a decimator module. when enabled, this mo dule performs ?deci- mation? of incoming images, i.e. shrinks them to arbitrarily selected width and height without reducing the field of view and without discarding any pixel values. the latter point merits underscoring, because the terms ?decimator? and ?image decimation? sug- gest image size reduction by deleting columns and/or rows at regular intervals. despite the terminology, no such deletions take plac e in the decimator module. instead, it per- forms ?pixel binning?, i.e. divides each input image into rectangular bins corresponding to individual pixels of the desired output image, averages pixel values in these bins and assembles the output image from the bin averages. pixels lying on bin boundaries con- tribute to more than one bin average: their values are added to bin-wide sums of pixel values with fractional weights. the entire procedure preserves all image information that can be included in the downsized output image and filters out high-frequency fea- tures that could cause aliasing. the image decimation in the ifp can be preceded by image cropping and/or image dec- imation in the sensor core. image cropping takes place when the sensor core is pro- grammed to output pixel values from a rectan gular portion of its pixel array - a window - www.datasheet.co.kr datasheet pdf - http://www..net/
pdf: 09005aef8202ec2e/source: 09005aef8202ebf7 micron technology, inc., reserves the right to change products or specifications without notice. MT9D111__2_rev5.fm - rev. b 2/06 en 17 ?2004 micron technology, inc. all rights reserved. MT9D111 - 1/3.2-inch 2-megapixel soc digital image sensor architecture overview micron confidential and proprietary smaller than the default 1600 x 1200 window. pi xels outside the sele cted cropping win- dow are not read out, which results in narrowe r field of view than at the default sensor settings. irrespective of the size and positi on of the cropping window, the MT9D111 sen- sor core can also decimate outgoing images by skipping columns and/or rows of the pixel array, and/or by binning 2 x 2 groups of pixels of the same color. since decimation by skipping (i.e. deletion) can cause aliasing (even if pixel binning is simultaneously enabled), it is generally better to change image size only by cropping and pixel binning. the image cropping and decimator module can be used to do digital zoom and pan. if the decimator is programmed to output imag es smaller than images coming from the sensor core, zoom effect can be produced by cropping the latter from their maximum size down to the size of the output images . the ratio of these tw o sizes determines the maximum attainable zoom factor. for ex ample, a 1600 x 1200 image rendered on a 160 x 120 display can be zoomed up to 10 times, since 1600/160 = 1200/120 = 10. pan- ning effect can be achieved by fixing the size of the cropping window and moving it around the pixel array. yuv-to-rgb/yuv conversion and output formatting the yuv data stream emerging from the de cimator module can either exit the color pipeline as-is or be converted before exit to an alternative yuv or rgb data format. see ?color conversion formulas? on page 115 an d the description of register r151:1 for more details. jpeg encoder and fifo the jpeg compression engine in the MT9D111 is a highly integrated, high-performance solution that can provide sustained data rates of almost 80mb/s for image sizes up to 1600 x 1200. additionally, the solution provides for low power consumption and full pro- grammability of jpeg compression pa rameters for image quality control. the jpeg encoding block is designed for continuous image flow and is ideal for low power applications. after initial configuratio n for a target application, it can be con- trolled easily for instantaneous stop/restart . a flexible configuration and control inter- face allows for full programmability of va rious jpeg-specific parameters and tables. jpeg encoding highlights 1. sequential dct (baseline) is o/iec 10918-1 jpeg-compliant 2. ycbcr 4:2:2 format compression 3. programmable quantization tables ? one each for luminance and chrominance (active) ? support for three pairs of quantization tables?two pairs serve as a backup for buffer overflow 4. programmable huffman tables ? 2 ac, 2 dc tables?separate for luminance and chrominance 5. quality/compression ratio control capability 6. 15 fps mjpeg capability (header processing in external host processor) www.datasheet.co.kr datasheet pdf - http://www..net/
pdf: 09005aef8202ec2e/source: 09005aef8202ebf7 micron technology, inc., reserves the right to change products or specifications without notice. MT9D111__2_rev5.fm - rev. b 2/06 en 18 ?2004 micron technology, inc. all rights reserved. MT9D111 - 1/3.2-inch 2-megapixel soc digital image sensor architecture overview micron confidential and proprietary figure 5: jpeg encoder block diagram output buffer overflow prevention the MT9D111 integrates sram for the storage of jpeg data. in order to prevent output buffer overflow, the MT9D111 implements an adaptive pixel clock (pixclk) rate scheme. when the adaptive pixel clock rate sc heme is enabled, pixclk can run at clock frequencies of (clkin freq/n1), (clkin freq /n2), (clkin freq/n3), where n1, n2, n3 are register values programmed by the host via the two-wire serial interface. a clock divider block from the master clock clkin gener ates the three clocks, pclk1, pclk2, and pclk3. at the start of the frame encode, pixclk is sourced by pclk1. the buffer fullness detec- tion block of the soc switches pixclk to pclk2 and then to pclk3, if necessary, based on the watermark at the output buffer (i.e., pe rcentage filled up). when the output buffer watermark reaches 50 percent, pixclk switches to pclk2. this increase in pixclk rate unloads the output buffer at a higher rate. however, depending on the image complexity and quantization table setting, the compressed image data may still be generated by the jpeg encoder faster than pixclk can unlo ad it. should the output buffer watermark equal 75 percent or higher, pixclk is switch ed to pclk3. when the output buffer water- mark drops back to 50 percent, pixclk is switched back to pclk2. when the output buffer watermark drops to 25 percent, pixclk is switched to pclk1. re-or d er line buffers (8y + 8 c ) output buffer 800 x 1 6 mux jpe g en c o d er blo c k re g file 2 x 1 6 ifp re g ister bus data unpa c kin g data pa c kin g s poof-frame timin g g enerator c ontrol re g isters/ s tatus pix c lk d out 0-d out 7 lv fv re-or d er buffer c ontroller jpe g input c ontrol itu-r bt. 6 01 interfa c e c ontrol buffer c ontrol jpe g en c o d er memories buffer fullness dete c t ld/unld c ontrol a d aptive pix c lk s o c _d out (y cbc r or r g b) www.datasheet.co.kr datasheet pdf - http://www..net/
pdf: 09005aef8202ec2e/source: 09005aef8202ebf7 micron technology, inc., reserves the right to change products or specifications without notice. MT9D111__2_rev5.fm - rev. b 2/06 en 19 ?2004 micron technology, inc. all rights reserved. MT9D111 - 1/3.2-inch 2-megapixel soc digital image sensor architecture overview micron confidential and proprietary when a decision to adapt pixclk frequency is made, line_valid, which qualifies the 8- bit data output (d out ), is de-asserted until pixclk is safely switched to the new clock. line_valid is independent of the horizontal timing of the uncompressed imaged. its assertion is strictly based on co mpressed image data availability. should an output buffer overfl ow still occur with pixclk at the maximum frequency, the output buffer and the small asynchronous fifo is flushed immediately. this causes line_valid to be de-asserted. frame_valid is also de-asserted. in addition to the adaptive pixclk rate sc heme, the MT9D111 also has storage for 3 sets of quantization tables (6 tables). in the event of output buffer overflow during the com- pression of the current frame, another set of the preloaded quantization tables can be used for the encoding of the immediate ne xt frame. then, the MT9D111 starts com- pressing the next frame starting with the nominal pixclk frequency. output interface control (two-wire serial interface) camera control and jpeg configuration/contro l are accomplished via a two-wire serial interface. the interface supports individual access to all camera function registers and jpeg control registers. in particular, all tabl es located in the jpeg quantization and huff- man memories are accessible via the two-wire in terface. to write to a particular register, the external host processor must send th e MT9D111 device address (selected by s addr or r0x0d:0[10]), the address of the register, and data to be written to it. see ?appendix a: two-wire serial register interface? on page 180 for a description of read sequence and for details of the tw o-wire serial interface protocol. data jpeg data is output in a bt656-like 8-bit parallel bus d out 0-d out 7, with frame_valid, line_valid, and pixclk. jpeg output data is valid when both frame_valid and line_valid are asserted. wh en the jpeg data output for the frame completes, or buffer overflow occurs, line_valid and frame_valid are de-asserted. the output clock runs at frequencies selected by frequency divisors n1, n2, and n3 (reg- isters r0x0e:2 and r0x0f:2), depe nding on output buffer fullness. www.datasheet.co.kr datasheet pdf - http://www..net/
pdf: 09005aef8202ec2e/source: 09005aef8202ebf7 micron technology, inc., reserves the right to change products or specifications without notice. MT9D111__2_rev5.fm - rev. b 2/06 en 20 ?2004 micron technology, inc. all rights reserved. MT9D111 - 1/3.2-inch 2-megapixel soc digital image sensor architecture overview micron confidential and proprietary auto focus algorithm auto focus (af) algorithm implemented in the MT9D111 firmware seeks to maximize sharpness of vertical lines in images output by the sensor, by guiding an external lens actuator to the position of best lens focu s. the algorithm is actuator-independent: it provides guidance by means of an abstract 1-dimensional position variable, leaving the translation of its changes into physical le ns movements to a se parate af mechanics (afm) driver. the af algorithm relies on th e afm driver to generate digital output sig- nals needed to move different lens actuators and to correctly indicate at all times if the lens is stationary or moving. the latter is required to prevent the af algorithm from using line sharpness measurements distorted by concurrent lens motion. for measuring line sharpness, the af algorithm relies on focus measurement engine in the color pipeline, which is a programmable vertical-edge-filtering module. the module convolves two pre-programmed 1-dimensional digital filters with luminance (y) data it receives row by row from the color interpolation module. in every interpolated image, the pixels whose y values are used in the co nvolution form a rectangular block that can be arbitrarily positioned and sized, and in ad dition divided into up to 16 equal-size sub- blocks, referred to as af wi ndows or zones. the absolute values of convolution results are summed separately for each filter over each of the af windows, yielding up to 32 sums per frame. as soon as these sums or raw sharpness scores are computed, they are put in dedicated ifp registers (r[77:84]:2 and r[87:94]:2), as are y averages from all the af windows (in r[67:74]:2). the af algorith m reduces these data to one normalized sharpness score per af window, by calculating for each window the ratio (s1+s2)/, where is the average y and s1 and s2 are the raw sharpness scores from the two fil- ters multiplied by 128. programming the fi lters into the MT9D111 includes specifying their relative weights, so each ratio can be called a weighted average of two equally nor- malized sharpness scores from the same af wi ndow. in addition to unequal weighting of the filters, the af algorithm permits uneq ual weighting of the windows, but window weights are not included in the normalized sharpness scores, for a reason that will soon become clear. there are several motion sequences through which the MT9D111 af algorithm can bring a lens to best focus position. all these sequences begin with a jump to a prese- lected start position, e.g. the infinity focus po sition. this jump is referred to as the first flyback. it is followed by a unidirectional seri es of steps that puts the lens at up to 19 pre- selected positions different from the start positi on. this series of steps is called the first scan. before and during this scan, the af algorithm stops the lens at each preselected position for long enough to obtain valid sharpness scores. the first normalized score from each af window is stored as both the worst (minimum) and best (maximum) score for that window. these two extreme scores are then up dated as the lens moves from one position to the next and a new maximum position is memorized at every update of the maximum score. in effect, the preselected set of lens positions is scanned for maxima of the nor- malized sharpness scores, while at the same time information needed to validate each maximum is being collected. this information is in the difference between the maxi- mum and the minimum of the same score. a small difference in their values indicates that the score is not sensitive to the lens position and therefore its observed extrema are likely determined by random noise. on the ot her hand, if the score varies a lot with the lens position, its maximum is much more likely to be valid, i.e. close to the true sharp- ness maximum for the corresponding af window. due to these considerations, the af algorithm implemented in MT9D111 ignores the maxima of all sharpness scores whose peak-to-trough variation is below a preset percentage threshold. the remaining max- www.datasheet.co.kr datasheet pdf - http://www..net/
pdf: 09005aef8202ec2e/source: 09005aef8202ebf7 micron technology, inc., reserves the right to change products or specifications without notice. MT9D111__2_rev5.fm - rev. b 2/06 en 21 ?2004 micron technology, inc. all rights reserved. MT9D111 - 1/3.2-inch 2-megapixel soc digital image sensor architecture overview micron confidential and proprietary ima, if any, are sorted by position and used to build a weight histogram of the scanned positions. the histogram is build by assigning to each position the sum of weights of all af windows whose normalized sharpness scores peaked at that position. the position with the highest weight in the histogram is th en selected as the best lens position. this method of selecting the best position may be compared to voting. the voting entities are the af windows, i.e. different image zones. depending on the imaged scene, they may all look sharp at the same lens position or at different ones. if all the zones have equal weight, the lens position at which a simple majority of them looks sharp is voted the best. if the weights of the zones are unequa l, it means that making some zones look sharp is more important than maximizing the entire sharp-looking area in the image. if there are no valid votes, because sharpness scores from all the af windows vary too little with the lens position, the af algorithm arbitr arily chooses the start position as the best. what happens after the first scan is user -programmable?the af algorithm gives the user a number of ways to proceed with final lens positioning. the user should select a way that best fits the magnitude of lens actu ator hysteresis and desired lens proximity to the truly optimal position. actuators with la rge, unknown or variable hysteresis should do a second flyback and either jump or retr ace the steps of the first scan to the best scanned position. actuators with constant hy steresis (like gear backlash) can be moved to that position directly from the end positi on of the scan?the af algorithm offers an option to automatically increa se the length of this move by a preprogrammed backlash- compensating step. finally, if the first scan is coarse relative to the positioning precision of the lens actuator and depth of field of th e lens, an optional seco nd fine scan can be performed around the lens positi on voted best after the first scan. this second scan is done in the same way as the first, except that the positions it covers are not pre-selected. instead, the af algorithm user must set step size and number of steps for the second scan. the second scan must be followed by the same hysteresis-matching motion sequence as the first scan, e.g. a third flyback and jump to the best position. modes there are four af camera modes that the mt 9d111 can fully support if it controls the position of the camera lens. 1. snapshot mode in this mode, a camera performs auto focu sing upon a user command to do so. when the auto focusing is finished, a snapshot is normally taken and there is no further af activity until next appropriate user command. the MT9D111 can do the auto focus- ing using its own af algorithm described ab ove or a substitute algorithm loaded into its ram. it can then wait or automaticall y proceed with other operations required to take a snapshot. 2. locked mode the MT9D111 can be commanded to lock the lens in its current position. between the command to lock the lens and another to rele ase it, the lens does not respond to other commands or scene changes. 3. focus-free mode in many situations, e.g. under low light or during video recording, it may be impossi- ble or undesirable to focus the lens prior to every image capture. instead, the lens can be locked in a position most likely to produce satisfactory images, e.g. the hyperfocal position. this position can be programmed into the MT9D111, and it can move and hold the lens there on command. 4. manual mode in this mode there is no af activity?focus ing the camera is left to its user. the user typically can move the camera lens in st eps, by manually issuing commands to the lens actuator, and observe the effect of hi s actions on a preview display. the MT9D111 www.datasheet.co.kr datasheet pdf - http://www..net/
pdf: 09005aef8202ec2e/source: 09005aef8202ebf7 micron technology, inc., reserves the right to change products or specifications without notice. MT9D111__2_rev5.fm - rev. b 2/06 en 22 ?2004 micron technology, inc. all rights reserved. MT9D111 - 1/3.2-inch 2-megapixel soc digital image sensor architecture overview micron confidential and proprietary can provide 30 fps image input for the disp lay and simultaneously translate user com- mands received via two-wire serial interf ace into digital waveforms driving the lens actuator. lens actuator interface actuators used to move lenses in af cameras can be classified into several broad catego- ries that differ significantly in their requirements for driving signals. these requirements also vary from one device to another within each category. to ensure its compatibility with many different actuators, the mt9d11 1 includes a general purpose input/output module (gpio). in essence, the gpio is a programmable rectangular waveform generator, with 12 indi- vidually controllable output pads (gpio0 th rough gpio11), a separate power supply pad (v dd gpio), and a separate clock domain that can be disconnected from the master clock to save power when the gpio is not in use. the gpio can toggle its output pads as fast as half the master clock frequency (every 25ns at 80 mhz). an external host processor and the embe dded microcontroller (mcu) of the MT9D111 have two ways to control the voltages on the gpio output pads: 1. setting or clearing bits in a control register the state of the gpio pads is updated immedi ately after writing to the register is fin- ished. since writing via the two-wire serial interface takes some time, this way does not give the host processor a very precise control over gpio output timing. 2. waveform programming the second way to obtain a desired output fr om the gpio is to program into its regis- ters a set of periodic waveforms and initia lize their generation. the gpio then gener- ates the programmed waveforms on its own, without waiting for any further input, and therefore with the best attainable timi ng precision. if necessary, the gpio can notify the mcu and the host processor abou t reaching certain points in the wave- forms generation, e.g., the end of a particular waveform. every gpio notification has two components: the gpio sends a wakeup sign al to the mcu and sets a bit in its sta- tus register that can be polled by the mcu and/or the host processor. the wakeup sig- nals have an effect only when the mcu is in sleep mode. the MT9D111 can be set up not only to output digital signals to a lens actuator and/or other similar devices, but also to receive their digital and analog feedback. all gpio out- put pads are reconfigurable as high-impedance digital inputs. the logical state of each gpio pad is mirrored by the state of a bit in a dedicated register, which allows the mcu and host processor to sample digital input signals at intervals equal to their respective register read times. analog input signals (0.1v to 1.0v) can be sampled using one of the 10-bit adcs in the sensor core . during horizontal blanking periods, when it does not digitize the sensor signal, this adc samples voltages on ain1, ain2, and ain3 input pads. the results are stored in dedicated registers. the maximum signal sampling rate permitted by this scheme is about 36000 samples per second. context and operational modes the MT9D111 can operate in several modes, including preview, still capture (snapshot), and video. all modes of operation are individually configurable and are organized as two contexts?context a and context b. a context is defined by se nsor image size, frame rate, resolution and other associated parameters. the user can switch between the two con- texts by sending a command via the two-wire serial interface. www.datasheet.co.kr datasheet pdf - http://www..net/
pdf: 09005aef8202ec2e/source: 09005aef8202ebf7 micron technology, inc., reserves the right to change products or specifications without notice. MT9D111__2_rev5.fm - rev. b 2/06 en 23 ?2004 micron technology, inc. all rights reserved. MT9D111 - 1/3.2-inch 2-megapixel soc digital image sensor architecture overview micron confidential and proprietary preview context a is primarily intended for use in th e preview mode. during preview, the sensor usually outputs low resolution images at a relatively high frame rate, and its power con- sumption is kept to a minimum. context b can be configured for the still capture or video mode, as required by the user. for still capture configuration, the user typically specifies the desired output image size, if jpeg compression and flash should be enabled, how many frames to capture, etc. for video, the user might select a different image size and a fixed frame rate. snapshot and flash to take a snapshot, the user must send a command that changes the context from a to context b. typical sequence of events after this command is as follows. first, the camera may turn on its led flash, if it has one and is required to use it. with the flash on, the camera exposure and white balance is automatically adjusted to the changed illumina- tion of the scene. next, the camera performs auto focusing. once in focus, it enables jpeg compression and capture one or more frames of desired size. a camera equipped with a xenon flash strobes it during the ca pture. completing the sequence, the camera automatically returns to context a and resume running preview. video to start video capture, the user has to change relevant context b settings, such as capture mode, image size and frame rate, and again send a context change command. upon receiving it, the MT9D111 switches to the mo dified context b settings, while continuing to output yuv-encoded image data. auto exposure and auto focus automatically switches to smooth continuous operation. to exit the video capture mode, the user has to send another context change command causin g the sensor to switch back to context a. auto exposure the auto exposure (ae) algorithm performs automatic adjustments of the image bright- ness by controlling exposure time and analog gains of the sensor core as well as digital gains applied to the image. two auto exposure algorithm modes are available: 1. preview 2. scene evaluative auto exposure is implemented by means of a firmware driver that analyzes image statis- tics collected by exposure measurement engine, makes a decision and programs the sensor core and color pipeline to achieve the desired exposure. the measurement engine subdivides the image into 16 windows organized as a 4 x 4 grid. preview mode this exposure mode is activated during preview or video capture. it relies on the expo- sure measurement engine that tracks speed and amplitude of the change of the overall luminance in the selected windows of the image. the backlight compensation is achieved by we ighting the luminance in the center of the image higher than the luminance on the periphery. other algorithm features include the rejection of fast fluctuations in illumina tion (time averaging), control of speed of response, and control of the sensitivity to the small changes. while the default settings are adequate in most situations, the user can program target brightness, measurement window, and other parameters described above. www.datasheet.co.kr datasheet pdf - http://www..net/
pdf: 09005aef8202ec2e/source: 09005aef8202ebf7 micron technology, inc., reserves the right to change products or specifications without notice. MT9D111__2_rev5.fm - rev. b 2/06 en 24 ?2004 micron technology, inc. all rights reserved. MT9D111 - 1/3.2-inch 2-megapixel soc digital image sensor architecture overview micron confidential and proprietary scene evaluative algorithm a scene evaluative ae algorithm is availabl e for use in snapshot mode. the algorithm performs scene analysis and classification wi th respect to its brightness, contrast and composure and then decides to increase, decrease or keep original exposure target. it makes most difference for backligh t and bright outdoor conditions. auto white balance the MT9D111 has a built-in auto white balance (awb) algorithm designed to compen- sate for the effects of changing spectra of the scene illumination on the quality of the color rendition. this sophisticated algorith m consists of two major parts: a measure- ment engine performing statis tical analysis of the image and a driver performing the selection of the optimal color correction matr ix, digital, and sensor core analog gains. while default settings of these algorithms are adequate in mo st situations, the user can re-program base color correction matrices, place limits on color channel gains, and con- trol the speed of both matrix and gain adjustments. unlike simple white balancing algo- rithms found in many pc cameras, the MT9D111 awb does not require the presence of gray or white elements in the image for good color rendition. the awb does not attempt to locate "brightest" or "grayest" element of the image but instead performs sophisti- cated image analysis to differentiate between changes in predominant spectra of illumi- nation and changes in predominant colors of the scene. while defaults are suitable for most applications, a wide range of algorithm parameters can be overwritten by the user via the serial interface. flicker detection flicker occurs when the integration time is not an integer multiple of the period of the light intensity. the automatic flicker detection block does not compensate for the flicker, but rather avoids it by detecting the flicke r frequency and adjusting the integration time. for integration times below the light intens ity period (10ms for 50hz environment), flicker cannot be avoided. www.datasheet.co.kr datasheet pdf - http://www..net/
pdf: 09005aef8202ec2e/source: 09005aef8202ebf7 micron technology, inc., reserves the right to change products or specifications without notice. MT9D111__2_rev5.fm - rev. b 2/06 en 25 ?2004 micron technology, inc. all rights reserved. MT9D111 - 1/3.2-inch 2-megapixel soc digital image sensor registers and variables micron confidential and proprietary registers and variables four types of configuration controls are available: 1. hardware registers 2. driver variables 3. special function registers (sfr) 4. mcu sram the following convention is used in the text below to designate registers and variables: r0x12:1, r0x12:1[3:0] or r18:1, r18:1[3:0] these refer to two-wire accessible register number 18, or 0x12 hexadecimal, located on page 1. [3:0] indicate bits. registers numbers range 0..255 and bits range 15..0. ?ae.target this refers to variable ?target? in the ae driver. ? sfr 0x1080 or sram 0x0400 this refers to special function register or sram located at address 0x1080 in mcu memory space. how to access registers, variables, and sfrs are accessed in different ways. registers hardware registers are organized into several pages. page 0 contains sensor controls. page 1 contains color pipeline controls. pa ge 2 contains jpeg, output fifo and more color pipeline controls. the desired page is selected by writing the desired value to r0xf0. after that all reads and writes to re gisters 0..255 except r0xf0 and r0xf1, is directed to the selected page. r0xf0 and r0 xf1 are special registers and are present on all pages. see ?appendix a: two-wire serial re gister interface? on page 180 for descrip- tion of two-wire register access. variables variables are located in the microcontroller ram memory. each driver, such as auto exposure, white balance, auto focus, etc., has a unique driver id (0..31) and a set of pub- lic variables organized as a structure. each va riable in this structure is uniquely identi- fied by its offset from the top of the structure and its size. the size can be 1 or 2 bytes, while the offset is 1 byte. all driver variables (public and private) can be accessed via r198:1 and r200:1. while two access modes are available- access by physical address and by logical address, the public variables are typically accessed by the logical method. the logical address, which is set in r198:1, consists of a 5-bit driver id number and a variable offset. examples are provided below. to set the variable ae.target=50: ? the variable has a driver id of 2. therefore, set r198:1[12:8]=2 ? the variable has an offset of 6. therefore, set r198:1[7:0]=6 ? this is a logical access. therefore, set r198:1[14:13]=01 ? the size of the variable is 8 bits. therefore, set r198:1[15]=1 ? by combining these bits, r198:1=0xa206. ? set r200:1=50 for the value of the variable to read the variable ae.target: ? since this is the same variable as the above example, r198:1=0xa206 www.datasheet.co.kr datasheet pdf - http://www..net/
pdf: 09005aef8202ec2e/source: 09005aef8202ebf7 micron technology, inc., reserves the right to change products or specifications without notice. MT9D111__2_rev5.fm - rev. b 2/06 en 26 ?2004 micron technology, inc. all rights reserved. MT9D111 - 1/3.2-inch 2-megapixel soc digital image sensor registers and variables micron confidential and proprietary ? read r200:1 for the current variable value to set the variable mon.arg1=0x1234: ? the variable has a driver id of 0. therefore, set r198:1[12:8]=0 ? the variable has an offset of 3. therefore, set r198:1[7:0]=3 ? this is a logical access. therefore, set r198:1[14:13]=01 ? the size of the variable is 16 bits. therefore, set r198:1[15]=0 ? by combining these bits, r198:1=0x2003 ? set r200:1=0x1234 for the value of the variable to read the variable mon.arg1: ? since this is the same variable as the above example, r198:1=0x2003 ? read r200:1 for the current variable value please see description for r198:1 and r200:1 in table 7, "ifp registers, page 2," on page 52 for more details. special function registers (sfr) and mcu sram special function registers (sfr) are registers connected to the local bus of the micro- controller. these registers include gpio, wa veform generator, and those important for firmware operation. sfr are accessed by ph ysical address. mcu sr am consists of 1k system memory and 1k user memory. examples of access: ? write into user sram. use to upload code a. r198:1 = 0x400 // address b. r200:1 = 0x1234 // write 16-bit value ? read from user sram c. r198:1 = 0x400 // address d. read r200:1 // read 16-bit value ? write to 8-bit gpio register e. r198:1 = 0x9079 // gpio_dir_l at 0x1079 f. r200:1 = 0x00fe // configure gpio[0] as output ? read from 8-bit gpio register g. r198:1 = 0x9079 // gpio_dir_l at 0x1079 h. read r200:1 //check gpio[7:0] pad state see r198:1 and r200:1 description in table 7, "ifp registers, page 2," on page 52 for more detail. www.datasheet.co.kr datasheet pdf - http://www..net/
pdf: 09005aef8202ec2e/source: 09005aef8202ebf7 micron technology, inc., reserves the right to change products or specifications without notice. MT9D111__2_rev5.fm - rev. b 2/06 en 27 ?2004 micron technology, inc. all rights reserved. MT9D111 - 1/3.2-inch 2-megapixel soc digital image sensor registers micron confidential and proprietary registers sensor core registers table 4: sensor core register defaults addr register description default pre mcu boot default after mcu boot 0x00 reserved 0x1519 0x1519 0x01 row start 0x001c 0x001c 0x02 column start 0x003c 0x003c 0x03 row width 0x04b0 0x04b0 0x04 col width 0x0640 0x0640 0x05 horizontal blanking b 0x015c 0x0204 0x06 vertical blanking b 0x0020 0x002f 0x07 horizontal blanking a 0x00ae 0x00fe 0x08 vertical blanking a 0x0010 0x000c 0x09 shutter width 0x04d0 n/a 0x0a row speed 0x00011 0x0001 0x0b extra delay 0x0000 0x0000 0x0c shutter delay 0x0000 0x0000 0x0d reset 0x0000 0x0000 0x1f frame valid control 0x0000 0x0000 0x20 read mode b 0x0000 0x0300 0x21 read mode a 0x0490 0x8400 0x22 dark col/rows 0x010f 0x010f 0x23 flash 0x0608 0x0608 0x24 extra reset 0x8000 0x8000 0x25 line valid control 0x0000 0x0000 0x26 bottom dark rows 0x0007 0x0007 0x2b green1 gain 0x0020 n/a 0x2c blue gain 0x0020 n/a 0x2d red gain 0x0020 n/a 0x2e green2 gain 0x0020 n/a 0x2f global gain 0x0020 n/a 0x30 row noise 0x042a 0x042a 0x59 black rows 0x00ff 0x00ff 0x5b dark g1 average n/a n/a 0x5c dark b average n/a n/a 0x5d dark r average n/a n/a 0x5e dark g2 average n/a n/a 0x5f calib threshold 0x231d 0x231d 0x60 calib control 0x0080 0x0080 0x61 calib green1 0x0000 0x0000 0x62 calib blue 0x0000 0x0000 0x63 calib red 0x0000 0x0000 0x64 calib green2 0x0000 0x0000 0x65 clock control 0xe000 0xe000 0x66 pll control 1 0x2809 0x1000 www.datasheet.co.kr datasheet pdf - http://www..net/
pdf: 09005aef8202ec2e/source: 09005aef8202ebf7 micron technology, inc., reserves the right to change products or specifications without notice. MT9D111__2_rev5.fm - rev. b 2/06 en 28 ?2004 micron technology, inc. all rights reserved. MT9D111 - 1/3.2-inch 2-megapixel soc digital image sensor registers micron confidential and proprietary 0x67 pll control 2 0x0501 0x0500 0xc0 global shutter control 0x0000 0x0000 0xc1 start integration (t1) 0x0064 0x0064 0xc2 start readout (t2) 0x0064 0x0064 0xc3 assert strobe (t3) 0x0096 0x0096 0xc4 de-assert strobe (t4) 0x00c8 0x00c8 0xc5 assert flash 0x0064 0x0064 0xc6 de-assert flash 0x0078 0x0078 0xe0 external sample 1 0x0000 0x0000 0xe1 external sample 2 0x0000 0x0000 0xe2 external sample 3 0x0000 0x0000 0xe3 external sampling control 0x0000 0x0000 0xf0 page register 0x0000 0x0000 0xf1 bytewise address 0x0000 0x0000 0xf2 context control 0x000b 0x0000 0xff reserved 0x1519 0x1519 table 4: sensor core register defaults (continued) addr register description default pre mcu boot default after mcu boot www.datasheet.co.kr datasheet pdf - http://www..net/
pdf: 09005aef8202ec2e/source: 09005aef8202ebf7 micron technology, inc., reserves the right to change products or specifications without notice. MT9D111__3_rev5.fm - rev. a 2/06 en 29 ?2004 micron technology, inc. all rights reserved. MT9D111 - 1/3.2-inch 2-megapixel soc digital image sensor registers micron confidential and proprietary registers notation used in the sensor register description table: sync?d to frame start n = no. the register value is updated and used immediately. y = yes. the register value is updated at next fra me start as long as th e synchronize changes bit is 0. frame start is defined as when the first dark row is read out. by default, this is 8 rows before frame_valid goes high. bad frame a bad frame is a frame where all rows do not have the same integration time, or offsets to the pixel values changed during the frame. n = no. changing the register va lue does not produce a bad frame. y = yes. changing the register va lue might produce a bad frame. ym = yes, but the bad frame is masked out unless the ?show bad frames? feature is (r0x0d:0[8]) is enabled. table 5: sensor register description bit field description default (hex) sync?d to frame start bad frame r0?0x00 - reserved (r/o) bits 15:0 reserved reserved. 1519 r1?0x01 - row start (r/w) bits 10:0 row start the first row to be read out, excluding any dark rows that may be read. to window the im age down, set this register to the starting y value. settin g a value less than 20 is not recommended because the dark rows should be read using r0x22:0. 1c y ym r2?0x02 - column start (r/w) bits 10:0 column start the first column to be read out, excluding dark columns that may be read. to window the image down, set this register to the starting x value. setting a value below 52 is not recommended because readou t of dark co lumns should be controlled by r0x22:0. 3c y ym r3?0x03 - row width (r/w) bits 10:0 row width number of rows in the image to be read out, excluding any dark rows or border rows th at may be read. the minimum supported value is 2. 4b0 y ym r4?0x04 - column width (r/w) bits 10:0 column width number of columns in image to be read out, excluding any dark columns or border colu mns that may be read. the minimum supported value is 9 in 1 adc mode and 17 in 2 adc mode. 640 y ym r5?0x05 - horizontal bl anking?context b (r/w) bits 13:0 horizontal blanking? context b number of blank co lumns in a row when context b is selected (r0xf2:0[0] = 1). the extra columns are added at the beginning of a row. see ?frame rate control? on page 128 for more information on supported register values. 15c y ym www.datasheet.co.kr datasheet pdf - http://www..net/
pdf: 09005aef8202ec2e/source: 09005aef8202ebf7 micron technology, inc., reserves the right to change products or specifications without notice. MT9D111__3_rev5.fm - rev. a 2/06 en 30 ?2004 micron technology, inc. all rights reserved. MT9D111 - 1/3.2-inch 2-megapixel soc digital image sensor registers micron confidential and proprietary r6?0x06 - vertical blanking?context b (r/w) bits 14:0 vertical blanking? context b number of blank rows in a frame when context b is selected (r0xf2:0[1] = 1). the minimum supported value is (4 + r0x22:0[2:0]). the actual vertical blanking time may be controlled by the shutter width (r0x09:0). see ?raw data timing? on page 119. 20 y n r7?0x07 - horizontal bl anking?context a (r/w) bits 13:0 horizontal blanking? context a number of blank co lumns in a row when context a is selected (r0xf2:0[0] = 0). the extra columns are added at the beginning of a row. see ?frame rate control? on page 128 for more information on supported register values. ae y ym r8?0x08 - vertical blanking?context a (r/w) bits 14:0 vertical blanking? context a number of blank rows in a frame when context a is chosen (r0xf2:0[1] = 1). the minimum supported value is (4 + r0x22:0[2:0]). the actual ve rtical blanking time may be controlled by the shutter width (r0x9:0). see ?raw data timing? on page 119. 10 y n r9?0x09 - shutter width (r/w) bits 15:0 shutter width integration time in number of rows. the integration time is also influenced by the shu tter delay (r0x0c:0) and the overhead time. 4d0 y n r10?0x0a - row speed (r/w) bits 15:14 reserved do not change from default value. bit 13 reserved do not change from default value. bit 8 invert pixel clock invert pixclk. when clear, frame_valid, line_valid, and d out are set up relative to the delayed rising edge of pixclk. when set, frame_ valid, line_v alid, and d out are set up relative to the de layed falling edge of pixclk. 0 n n bits 7:4 delay pixel clock number of half master clock cy cle increments to delay the rising edge of pixclk re lative to transitions on frame_valid, li ne_valid, and d out . 1 n n bit 3 reserved do not change from default value.. bits 2:0 pixel clock speed a programmed value of n gives a pixel clock period of n master clocks in 2 adc mode and 2*n master clocks in 1 adc mode. a value of ?0? is treated like (and reads back as) a value of ?1.? 1 y ym r11?0x0b - extra delay (r/w) bits 13:0 extra delay extra blanking inserted between frames. a programmed value of n increases the vertical blanking time by n pixel clock periods. can be used to get a more exact frame rate. it may affect the integration times of parts of the image when the integration time is less than one frame. 0 y n 2 table 5: sensor register description (continued) bit field description default (hex) sync?d to frame start bad frame www.datasheet.co.kr datasheet pdf - http://www..net/
pdf: 09005aef8202ec2e/source: 09005aef8202ebf7 micron technology, inc., reserves the right to change products or specifications without notice. MT9D111__3_rev5.fm - rev. a 2/06 en 31 ?2004 micron technology, inc. all rights reserved. MT9D111 - 1/3.2-inch 2-megapixel soc digital image sensor registers micron confidential and proprietary r12?0x0c - shutter delay (r/w) bits 13:0 shutter delay the amount of time from the end of the sampling sequence to the beginning of the pixel reset sequence. if the value in this register exceeds the row ti me, the reset of the row does not complete before the associ ated row is sampled, and the sensor does not generate an image. a programmed value of n reduces the integration time by ( n/2 ) pixel clock periods in 1 adc mode and by n pixel clock periods in 2 adc mode. 0 y n r13?0x0d - reset (r/w) bit 15 synchronize changes by default, update of many registers are synchronized to frame start. setting this bit in hibits this update; register changes remain pending until th is bit is returned to ?0.? when this bit is returned to ?0,? all pending register updates are made on the next frame start. 0 n n bit 10 toggle s addr by default, the sensor serial bus responds to addresses 0xba and 0xbb. when this bit is set, the sensor serial bus responds to addresses 0x90 and 0x91. writes to this bit are ignored when standby is asserted. see ?slave address? on page 181. 0 n n bit 9 restart bad frames when set, a restart is forced to take place whenever a bad frame is detected. this can sh orten the delay when waiting for a good frame because the delay, when masking out a bad frame, is the integration time rather than the full frame time. 0 n n bit 8 show bad frames 1 ? output all frames (including bad frames). 0 ? only output good frames (default). a bad frame is defined as the first frame following a change to: window size or position, horizontal blanking, pixel clock speed, zoom, row or column skip, binning, mirroring, or use of border. 0 n n bit 7:6 inhibit standby / drive pins 00 or 01 ? setting standby high puts sensor into standby state with high-impedance outputs 10 ? setting standby high only puts the outputs in high-z 11 ? causes standby to be ignored 0 n n bit 5 reset soc when this bit is set to 1, soc is put in reset state. it exits this state when the bit is set back to 0. any attempt to access soc regist ers (ifp page 1 and 2) in the reset state results in a sensor hang-up. the sensor cannot recover from it without a hard re set or power cycle. 0 n bit 4 output disable setting this bit to 1 puts the pi n interface in a high-z. see ?output enable control? on page 153. if the d out *, pixclk, frame_valid, or line_valid is floating during standby, this bit should be se t to ?0? to turn off the input buffer, reducing standby curre nt (see technical note tn0934 ?standby sequence?) . this bit must wo rk together with bit 6 to take effect. 0 bit 3 reserved keep at default value. 0 table 5: sensor register description (continued) bit field description default (hex) sync?d to frame start bad frame www.datasheet.co.kr datasheet pdf - http://www..net/
pdf: 09005aef8202ec2e/source: 09005aef8202ebf7 micron technology, inc., reserves the right to change products or specifications without notice. MT9D111__3_rev5.fm - rev. a 2/06 en 32 ?2004 micron technology, inc. all rights reserved. MT9D111 - 1/3.2-inch 2-megapixel soc digital image sensor registers micron confidential and proprietary bit 2 standby setting this bit to 1 places th e sensor in a low-power state. any attempt to access registers r[0xf7:0xfd]:0 in this state results in a sensor hang-up. the sensor cannot recover from it without a hard reset or power cycle. 0 n ym bit 1 restart setting this bit causes the sensor to truncate the current frame and start resetting the first row. the delay before the first valid frame is read out is equal to the integration time. this bit is write - 1 but always reads back as 0. 0 n ym bit 0 reset setting this bit puts the sens or in reset; the frame being generated is truncated and the pin interface goes to an idle state. all internal registers (exc ept for this bit) go to the default power-up state. clearing this bit resumes normal operation. 0 n ym r31?0x1f - frame_valid control (r/w) bit 15 enable early frame_valid fall 1 ? enables the early disabling of frame_valid as set in bits 14:8. line_valid is still generated for all active rows. 0 ? default. frame_valid goes low 6 pixel clocks after last line_valid. 0 n n bits 14:8 early frame_valid fall when enabled, the frame_va lid falling edge occurs within the programmed number of rows before the end of the last line_valid. (1 + bits 14:8)*row time + constant (constant = 3 in default mode) the value of this field must not be larger than row width r0x03:0. 0 n n bit 7 enable early frame_valid rise 1 ? enables the early rise of frame_valid as set in bits 6:0. 0 ? default. frame_valid goes hi gh 6 pixel clocks before first line_valid. 0 n n bits 6:0 early frame_valid rise when enabled, the frame_vali d rising edge is set high the programmed number of rows before the first line_valid: (1 + bits 6:0)*row time + horizontal blank + constant (constant = 3 in default mode). 0 n n r32?0x20 - read mode?context b (r/w) bit 15 binning? context b when read mode context b is selected (r0xf2:0[3] = 1): 0 ? normal operation. 1 ? binning enabled. see ?bin ning? on page 127 and see ?frame rate control? on page 128 for a full description. 0 y ym table 5: sensor register description (continued) bit field description default (hex) sync?d to frame start bad frame www.datasheet.co.kr datasheet pdf - http://www..net/
pdf: 09005aef8202ec2e/source: 09005aef8202ebf7 micron technology, inc., reserves the right to change products or specifications without notice. MT9D111__3_rev5.fm - rev. a 2/06 en 33 ?2004 micron technology, inc. all rights reserved. MT9D111 - 1/3.2-inch 2-megapixel soc digital image sensor registers micron confidential and proprietary bit 13 zoom enable 0 ? normal operation. 1 ? zoom is enabled, with zoom factor [zoom] defined in bits 12:11. in zoom mode, the pixel data ra te is slowed by a factor of [zoom]. this is achieved by outputting [zoom - 1] blank rows between each output row. setting this mode allows the user to fill a window that is [zoom] times larger with interpolated data. the pixel clock speed is not af fected by this operation, and the output data for each pixe l is valid for [zoom] pixel clocks. every row is followed by [zoom - 1] blank rows (with their own line_valid, but all data bits = 0) of equal time. the combination of th is register and an appropriate change to the window sizing registers allows the user to zoom to a region of interest withou t affecting the frame rate. 0 y ym bits 12:11 zoom when zoom is enabled by bit 13, this field determines the zoom amount: 00 ? zoom 2x 01 ? zoom 4x 10 ? zoom 8x 11 ? zoom 16x 0 y ym bit 10 use 1 adc? context b when read mode context b is se lected (bit 3, r0xf2:0 = 1): 0 ? use both adcs to achieve maximum speed. 1 ? use 1 adc to reduce po wer. maximum readout frequency is now half the master clock frequency, and the pixel clock is automatically adjusted as described for the pixel clock speed register. 0 y ym bit 9 show border this bit indicates whether to show the border enabled by bit 8. 0 ? border is enabled but not sh own; vertical blanking is increased by 8 rows and horizont al blanking is increased by 8 pixels. 1 ? border is enabled and shown; frame_valid time is extended by 8 rows and line_val id is extended by 8 pixels. see ?pixel border? on page 124. 0 n n bit 8 over sized 0 ? normal uxga size. 1 ? adds a 4-pixel border arou nd the active image array independent of readout mode (skip, zoom, mirror, etc.). setting this bit adds 8 to th e number of rows and columns in the frame. 0 y ym bit 7 column skip enable? context b when read mode context b is selected (r0xf2:0[3] = 1): 1 ? enable column skip. 0 ? normal readout. 0 y ym bits 6:5 column skip? context b when read mode context b is selected (r0xf2:0[3] = 1) and column skip is enabled (bit 7 = 1): 00 ? column skip 2x 01 ? column skip 4x 10 ? column skip 8x 11 ? column skip 16x see ?column and row skip? on page 125 for more information. 0 y ym table 5: sensor register description (continued) bit field description default (hex) sync?d to frame start bad frame www.datasheet.co.kr datasheet pdf - http://www..net/
pdf: 09005aef8202ec2e/source: 09005aef8202ebf7 micron technology, inc., reserves the right to change products or specifications without notice. MT9D111__3_rev5.fm - rev. a 2/06 en 34 ?2004 micron technology, inc. all rights reserved. MT9D111 - 1/3.2-inch 2-megapixel soc digital image sensor registers micron confidential and proprietary bit 4 row skip enable? context b when read mode context b is selected (r0xf2:0[3] = 1): 1 ? enable row skip. 0 ? normal readout. 0 y ym bits 3:2 row skip? context b when read mode context b is selected (r0xf2:0[3] = 1) and row skip is enabled (bit 4 = 1): 00 ? row skip 2x 01 ? row skip 4x 10 ? row skip 8x 11 ? row skip 16x see ?column and row skip? on page 125 for more information. 0 y ym bit 1 mirror columns read out columns from right to left (mirrored). when set, column readout starts from co lumn (column start + column size) and continues down to (column start + 1). when clear, readout starts at column st art and continues to (column start + column size - 1). this ensures that th e starting color is maintained. 0 y ym bit 0 mirror rows read out rows from bottom to top (upside down). when set, row readout starts from row (row start + row size) and continues down to (row sta rt + 1). when clear, readout starts at row start and continues to (row start + row size -1). this ensures that the sta rting color is maintained. 0 y ym r33?0x21 - read mode?context a (r/w) bit 15 binning? context a when read mode context a is selected (r0xf2:0[3] = 0): 0 ? normal operation. 1 ? binning enabled. see ?binning? on page 127. 1 y ym bit 10 use 1 adc? context a when read mode context a is selected (r0xf2:0[3] = 0): 0 ? use both adcs to achieve maximum speed. 1 ? use one adc to reduce power. maximum readout frequency is now half of th e master clock, and the pixel clock is automatically adjusted as described for the pixel clock speed register. 1 y ym bit 7 column skip enable? context a when read mode context a is selected (r0xf2:0[3] = 0): 1 ? enable column skip. 0 ? normal readout. 1 y ym bits 6:5 column skip? context a when read mode context a is selected (r0xf2:0[3] = 0) and column skip is enabled (bit 7 = 1): 00 ? column skip 2x 01 ? column skip 4x 10 ? column skip 8x 11 ? column skip 16x see ?column and row skip? on page 125 for more information. 0 y ym bit 4 row skip enable? context a when read mode context a is selected (r0xf2:0[3] = 0): 1 ? enable row skip. 0 ? normal readout. 1 y ym table 5: sensor register description (continued) bit field description default (hex) sync?d to frame start bad frame www.datasheet.co.kr datasheet pdf - http://www..net/
pdf: 09005aef8202ec2e/source: 09005aef8202ebf7 micron technology, inc., reserves the right to change products or specifications without notice. MT9D111__3_rev5.fm - rev. a 2/06 en 35 ?2004 micron technology, inc. all rights reserved. MT9D111 - 1/3.2-inch 2-megapixel soc digital image sensor registers micron confidential and proprietary bits 3:2 row skip? context a when read mode context a is selected (r0xf2:0[3] = 0) and row skip is enabled (bit 4 = 1): 00 ? row skip 2x 01 ? row skip 4x 10 ? row skip 8x 11 ? row skip 16x see ?column and row skip? on page 125 for more information. 0 y ym r34?0x22 - show control (r/w) bit 10 number of dark columns the MT9D111 has 40 dark columns. 1 ? read out 36 dark columns (4?39). ignored during binning, where all 40 dark columns are used. 0 ? read out 20 dark columns (4?23). 0 n n bit 9 show dark columns when set, the 20/36 (dependent on bit 10) dark columns are output before the active pixels in a line. there is an idle period of 2 pixels between readout of the dark columns and readout of the active im age. therefore, when set, line_valid is asserted 22 pi xel times earlier than normal, and the horizontal blanking ti me is decreased by the same amount. 0 n n bit 8 read dark columns 1 ? enables the readout of dark columns for use in the row- wise noise correction algori thm. the number of columns used are 40 in binning mode, and otherwise determined by bit 10. 0 ? when disabled, an arbitrary number of dark columns can be read out by including them in the active image. enabling the dark columns incr eases the minimum value for horizontal blanking but does not affect the row time. 1 n y bit 7 show dark rows when set, the programmed dark rows is output before the active window. frame_valid is thus asserted earlier than normal. this has no effect on integration time or frame rate. 0 n n bits 6:4 dark start address the start address for the dark rows within the 8 available rows (an offset of 4 is added to compensate for the guard pixels). must be set so all da rk rows read out falls in the address space 0:7. 0 n n bit 3 reserved do not change from default value. bits 2:0 num dark rows a value of n causes ( n + 1 ) dark rows to be read out at the start of each frame when da rk row readout is enabled (bit 3). 7 n y r35?0x23 - flash control (r/w) bit 15 flash reflects the current state of flash output. 0 bit 14 triggered indicates that flash output is asserted for the current frame. 0 bit 13 xenon flash enable xenon flash. when set, flash output asserts for the programmed period (bits 7:0) during vertical blanking. this is achieved by keeping the in tegration time equal to one frame, and the pulse width less than the vertical blank time. 0 y n 1 bits 12:11 frame delay delay of the flash pulse measured in frames. 0 n n table 5: sensor register description (continued) bit field description default (hex) sync?d to frame start bad frame www.datasheet.co.kr datasheet pdf - http://www..net/
pdf: 09005aef8202ec2e/source: 09005aef8202ebf7 micron technology, inc., reserves the right to change products or specifications without notice. MT9D111__3_rev5.fm - rev. a 2/06 en 36 ?2004 micron technology, inc. all rights reserved. MT9D111 - 1/3.2-inch 2-megapixel soc digital image sensor registers micron confidential and proprietary bit 10 end of reset 1 ? in xenon mode the flash is triggered after the resetting of a frame. 0 ? in xenon mode the flash is triggered after the readout of a frame. 1 n n bit 9 every frame 1 ? flash should be en abled every frame. 0 ? flash should be enable d for one frame only. 1 n n bit 8 led flash enable led flash. when set, flash output asserts prior to the start of the resetting of a frame and remains asserted until the end of the readout of the frame. 0 y y 1 bits 7:0 xenon count length of flash pulse when xenon flash is enabled. the value specifies the length in units of 1024*pixclk cycle increments. when the xenon co unt is set to its maximum value (0xff), the flash pulse is automatica lly truncated prior to the readout of the fi rst row, giving the longest pulse possible. 8 n n r36?0x24 - extra reset (r/w) bit 15 extra reset enable 0 ? only programmed window (set by r0x01:0 through r0x04:0) and black pixels are read. 1 ? two additional rows are read and reset above and below programmed window to prevent blooming to active area. 1 n n bit 14 next row reset when set, and the in tegration time is less than one frame time, row ( n + 1 ) is reset immediately prior to resetting row (n) . this is intended to preven t blooming across rows under conditions of very high illumination. 0 n n bits 13:0 reserved do not change from default value. r37?0x25 - line_valid control (r/w) bit 15 xor line_valid 1 ? line_valid = ?continu ous? line_valid xor frame_valid. 0 ? normal line_valid (default, no xoring of line_valid). ineffective if continuous line_valid is set. 0 n n bit 14 continuous line_valid 1 ? ?continuous? line_valid (continue producing line_valid during vertical blanking). 0 ? normal line_valid (default , no line_valid during vertical blanking). 0 n n 3 r38?0x26 - bottom dark rows (r/w) bit 7 show the bottom dark rows are visibl e in the image if the bit is set. 0 n n bits 6:4 start address defines the start address with in the 8 bottom dark rows. 0 n n bit 3 enable readout enable readout of the bottom dark rows. 0 n y bits 2:0 number of dark rows defines the number of bottom dark rows to be used. (the number of rows used is the specified value + 1.) 7 n y r43?0x2b - green1 gain (r/w) bits 11:9 digital gain total gain = (bit 9 + 1)*(bit 10 + 1)*(bit 11 + 1)*analog gain (each bit gives 2x gain). 0 y n bits 8:7 analog gain analog gain = (bit 8 + 1)*(bit 7 + 1)*initial gain (each bit gives 2x gain). 0 y n table 5: sensor register description (continued) bit field description default (hex) sync?d to frame start bad frame www.datasheet.co.kr datasheet pdf - http://www..net/
pdf: 09005aef8202ec2e/source: 09005aef8202ebf7 micron technology, inc., reserves the right to change products or specifications without notice. MT9D111__3_rev5.fm - rev. a 2/06 en 37 ?2004 micron technology, inc. all rights reserved. MT9D111 - 1/3.2-inch 2-megapixel soc digital image sensor registers micron confidential and proprietary bits 6:0 initial gain initial gain = bits 6:0*0.03125. 20 y n r44?0x2c - blue gain (r/w) bits 11:9 digital gain total gain = (bit 9 + 1)*(bit 10 + 1)*(bit 11 + 1)*analog gain (each bit gives 2x gain). 0 y n bits 6:0 initial gain initial gain = bits [6:0]*0.03125. 20 y n bits 8:7 analog gain analog gain = (bit 8 + 1)*(bit 7 + 1)*initial gain (each bit gives 2x gain). 0 y n r45?0x2d - red gain (r/w) bits 11:9 digital gain total gain = (bit 9 + 1)*(bit 10] + 1)*(bit 11 + 1)*analog gain (each bit gives 2x gain). 0 y n bits 8:7 analog gain analog gain = (bit 8 + 1)*(bit 7 + 1)*initial gain (each bit gives 2x gain). 0 y n bits 6:0 initial gain initial gain = bits 6:0*0.03125. 20 y n r46?0x2e - green2 gain (r/w) bits 11:9 digital gain total gain = (bit 9 + 1)*(bit 10 + 1)*(bit 11 + 1)*analog gain (each bit gives 2x gain). 0 y n bits 8:7 analog gain analog gain = (bit 8 + 1)*(bit 7 + 1)*initial gain (each bit gives 2x gain). 0 y n bits 6:0 initial gain initial gain = bits 6:0*0.03125. 20 y n r47?0x2f - global gain (r/w) bits 11:0 global gain this register can be used to si multaneously set all 4 gains. when read, it returns th e value stored in r0x2b:0. 20 y n r48?0x30 - row noise (r/w) bit 15 frame-wise digital correction by default, the row noise is calculated and compensated for individually for each color of eac h row. when this bit is set, the row noise is calculated and applied for each color of each of the first two 2 (two pairs of values) and the same values are applied to each su bsequent row, so that new values are calculated and applied once per frame. 0 n n bits 14:12 gain threshold when the upper analog gain bi ts are equal to or larger than this threshold, the dark column average is used in the row noise correction algorithm. otherwis e, the subtracted value is determined by bit 11. this check is independently performed for each color, and is a means to turn off the black level algorith m for lower gains. 0 n n bit 11 use black level average 1 ? use black level frame average from the dark rows in the row noise correction algorith m for low gains. this frame average was taken before the last adjustment of the offset dac for that frame, so it might be slightly off. 0 ? use mean of black level programmed threshold in the row noise correction al gorithm for low gains. 0 n y bit 10 enable correction 1 ? enable row noise canc ellation algorithm. when this bit is set, the aver age value of the dark columns read out is used as a correction for the whole row. the dark average is subtracted from each pixel on the row, and then a constant is added (bits 9:0). 0 ? normal operation. 1 n y table 5: sensor register description (continued) bit field description default (hex) sync?d to frame start bad frame www.datasheet.co.kr datasheet pdf - http://www..net/
pdf: 09005aef8202ec2e/source: 09005aef8202ebf7 micron technology, inc., reserves the right to change products or specifications without notice. MT9D111__3_rev5.fm - rev. a 2/06 en 38 ?2004 micron technology, inc. all rights reserved. MT9D111 - 1/3.2-inch 2-megapixel soc digital image sensor registers micron confidential and proprietary bits 9:0 row noise constant constant used in the row noise cancellation algorithm. it should be set to the dark leve l targeted by the black level algorithm plus the noise expected betw een the averaged values of the dark columns. th e default constant is set to 42 lsb. 2a n y r89?0x59 - black rows (r/w) bits 7:0 black rows for each bit set, the correspon ding dark row (rows 0?7) are used in the black level algori thm. for this to occur, the reading of those rows must be enabled by the settings in r0x22:0. ff n n r91?0x5b - green1 frame average (r/o) bits 6:0 green1 frame average the frame-averaged green1 black level that is used in the black level calibr ation algorithm. r92?0x5c - blue frame average (r/o) bits 6:0 blue frame average the frame-averaged blue black level that is used in the black level calibr ation algorithm. r93?0x5d - red frame average (r/o) bits 6:0 red frame average the frame-averaged red black leve l that is used in the black level calibration algorithm. r94?0x5e - green2 frame average (r/o) bits 6:0 green2 frame average the frame-averaged green2 black level that is used in the black level calibr ation algorithm. r95?0x5f - threshold (r/w) bits 14:8 upper threshold upper threshold for targeted black level in adc lsbs. 23 n n bits 6:0 lower threshold lower threshold for targeted black level in adc lsbs. 1d n n r96?0x60 - calibration control (r/w) bit 15 disable rapid sweep mode disables the rapid sweep mode in the black le vel algorithm. the averaging mode remains enabled. 0 y n bit 12 recalculate when set, the rapid sweep mode is triggered if enabled, and the running frame average is reset to the current frame average. this bit is write - 1, but always reads back as ?0.? 0 y n bit 10 limit rapid sweep 1 ? dark rows 8?11 are not used for the black level algorithm controlling the cali bration value. instead, these rows are used to calculate da rk averages that can be a starting point for the digital frame-wise black level algorithm. 0 ? all dark rows can be used fo r the black level algorithm. this means that the internal average might not correspond to the calibration value used fo r the frame, so the dark row average should in this case no t be used as the starting point for the frame-wise black level algorithm. 0 n n table 5: sensor register description (continued) bit field description default (hex) sync?d to frame start bad frame www.datasheet.co.kr datasheet pdf - http://www..net/
pdf: 09005aef8202ec2e/source: 09005aef8202ebf7 micron technology, inc., reserves the right to change products or specifications without notice. MT9D111__3_rev5.fm - rev. a 2/06 en 39 ?2004 micron technology, inc. all rights reserved. MT9D111 - 1/3.2-inch 2-megapixel soc digital image sensor registers micron confidential and proprietary bit 9 freeze calibration when set, does not let the averaging mode of the black level algorithm change the cali bration value. use this with the feature in the frame-wise black level al gorithm that allows you to trigge r the rapid sweep mode when the dark column average gets away fro m the black level target. 0 n n bit 8 sweep mode when set, the calibration valu e is increased by one every frame, and all channels are the same. this can be used to get a ramp input to the adc from the calibration dacs. 0 n n bits 7:5 frames to average over two to the power of this value determines how many frames to average when the blac k level algorithm is in the averaging mode. in this mode, the running frame average is calculated from th e following formula: running frame ave = old running frame ave (old running frame ave)/2 n + (new frame ave)/ 2 n . 4 n n bit 4 step size forced to 1 when set, the step size is fo rced to 1 for the rapid sweep algorithm. default operation (0) is to start at a higher step size when in rapid sweep mode, to converge faster to the correct value. 0 n n bit 3 switch calibration values when set, the calibration values applied to the two channels are switched. this is not recommended and should not be used. 0 bit 2 same red/blue when this bit is set, the same calibration value is used for red and blue pixels: calib blue = calib red. 0 n y bit 1 same green when this bit is set, the same calibration value is used for all green pixels: calib green2 = calib green1. 0 n y bit 0 manual override manual override of bl ack level correction. 1 ? override automatic blac k level correction with programmed values. (r0x61:0?r0x64:0). 0 ? normal operation (default). 0 n y r97?0x61 - green1 calibration value (r/w) bits 8:0 green1 calibration value analog calibration offset for green1 pixels, represented as a two?s complement signed 8-bit value (if bit 8 is clear, the offset is positive and the magnitude is given by bits 7:0. if bit 8 is set, the offset is nega tive and the magnitude is given by not ([7:0]) + 1). if r0x60:0[0] = 0, this register is r/o and returns the current value co mputed by the black level calibration algorithm. if r0x60:0[ 0] = 1, this register is r/w and can be used to set the calibration offset manually. green1 pixels share ro ws with red pixels. 0 n y r98?0x62 - blue calibration value (r/w) bits 8:0 blue calibration value analog calibration offset for blue pixels, represented as a two?s complement signed 8-bit value (if bit 8 is clear, the offset is positive and the magnitude is given by bits 7:0. if bit 8 is set, the offset is nega tive and the magnitude is given by not ([7:0]) + 1). if r0x60:0[0] = 0, this register is r/o and returns the current value co mputed by the black level calibration algorithm. if r0x60:0[ 0] = 1, this register is r/w and can be used to set the calibration offset manually. 0 n y table 5: sensor register description (continued) bit field description default (hex) sync?d to frame start bad frame www.datasheet.co.kr datasheet pdf - http://www..net/
pdf: 09005aef8202ec2e/source: 09005aef8202ebf7 micron technology, inc., reserves the right to change products or specifications without notice. MT9D111__3_rev5.fm - rev. a 2/06 en 40 ?2004 micron technology, inc. all rights reserved. MT9D111 - 1/3.2-inch 2-megapixel soc digital image sensor registers micron confidential and proprietary r99?0x63 - red calibration value (r/w) bits 8:0 red calibration value analog calibration offset for red pixels, represented as a two?s complement signed 8-bit value (if bit 8 is clear, the offset is positive and the magnitude is given by bits 7:0. if bit 8 is set, the offset is nega tive and the magnitude is given by not ([7:0]) + 1). if r0x60:0[0] = 0, this register is r/o and returns the current value co mputed by the black level calibration algorithm. if r0x60:0[ 0] = 1, this register is r/w and can be used to manually set the calibration offset. 0 n y r100?0x64 - green2 calibration value (r/w) bits 8:0 green2 calibration value analog calibration offset for green2 pixels, represented as a two?s complement signed 8-bit value (if bit 8 is clear, the offset is positive and the magnitude is given by bits 7:0. if bit 8 is set, the offset is nega tive and the magnitude is given by not ([7:0]) + 1.) if r0x60:0[0] = 0, this register is r/o and returns the current value co mputed by the black level calibration algorithm. if r0x60:0[ 0] = 1, this register is r/w and can be used to manually set the calibration offset. green2 pixels share rows with blue pixels. 0 n y r101?0x65 - clock (r/w) bit 15 pll bypass 1 ? bypass the pll. use clkin in put signal as master clock. 0 ? use clock produced by pll as master clock. 1 n n bit 14 pll power- down 1 ? keep pll in power-down to save power (default). 0 ? pll powered-up. 1 n n bit 13 power-down pll during standby this register only has an effect when bit 14 = 0. 1 ? turn off pll (power-down) during standby to save power (default). 0 ? pll powered-up during standby. 1 n n bit 2 clk_newrow force clk_newrow to be on continuously. 0 n n bit 1 clk_newframe force clk_newframe to be on continuously. 0 n n bit 0 clk_ship force clk_ship to be on continuously. 0 n n r102?0x66 - pll control 1 (r/w) bits 15:8 m m value for pll must be 16 or higher. 28 n n bits 5:0 n n value for pll. 9 n n r103?0x67 - pll control 2 (r/w) bits 11:8 reserved do not change from default value. bits 6:0 p p value for pll. 1 n n r192?0xc0 - global reset control (r/w) bit 15 global reset enable enter global reset. this bit is write - 1 only and is always read 0. 0 n n 4 bit 2 global reset flash control 1 ? flash is de-asserted at end of readout. 0 ? flash is de-asserted by r0xb6:0 (de-assert flash). 0 n n bit 1 global reset strobe control 1 ? strobe is de-asserted at end of readout. 0 ? strobe is de-asserted by r0xc4:0 (de-assert strobe). 0 n n table 5: sensor register description (continued) bit field description default (hex) sync?d to frame start bad frame www.datasheet.co.kr datasheet pdf - http://www..net/
pdf: 09005aef8202ec2e/source: 09005aef8202ebf7 micron technology, inc., reserves the right to change products or specifications without notice. MT9D111__3_rev5.fm - rev. a 2/06 en 41 ?2004 micron technology, inc. all rights reserved. MT9D111 - 1/3.2-inch 2-megapixel soc digital image sensor registers micron confidential and proprietary bit 0 global reset readout control 1 ? start of readout is contro lled by falling edge of grst_ctr. 0 ? start of readout is controlle d by r0xc2:0 (start readout time). 0 n n r193?0xc1 - start integration time (t1) (r/w) bits 15:0 start integration time (t1) these 16 bits are compared to the upper bits of a 24-bit counter, which starts counting master clocks when global reset starts. when this value is reached, global reset is de- asserted, and integration time starts. there is a minimum time period for which global reset is always held. this time is defined by the physical properties of the boost circuit. 64 n n r194?0xc2 (194) start readout time (t2) (r/w) bits 15:0 start readout time (t2) these 16 bits are added to r0xc 1:0 (start integration time) and compared to the 24-bit counter mentioned for r0xc1:0. the value defines the time fr om when integration time starts to when it is guarante ed to end. readout then commences. 64 n n r195?0xc3 - assert strobe time (t3) (r/w) bits 15:0 assert strobe time (t3) these 16 bits are compared to the upper bits of a 24-bit counter, which starts counting master clocks when global reset starts. when this value is reached, the strobe is asserted. 96 n n r196?0xc4 - de-assert strobe time (t4) (r/w) bits 15:0 de-assert strobe time (t4) these 16 bits are compared to the upper bits of a 24-bit counter, which starts counting master clocks when global reset starts. when this value is reached, the strobe is de- asserted if strobe control is ?0? (r0xc0:0[1]). c8 n n r197?0xc5 - assert flash time (r/w) bits 15:0 assert flash time these 16 bits are compared to the upper bits of a 24-bit counter, which starts counting master clocks when global reset starts. when this value is reached, the flash is asserted. 64 n n r198?0xc6 - de-assert flash time (r/w) bits 15:0 de-assert flash time these 16 bits are compared to the upper bits of a 24-bit counter, which starts counting master clocks when global reset starts. when this value is reached, the flash is de- asserted if flash control is ?0? (r0xc0:0[2]). 78 n n r224?0xe0 - ain3 sample (r/o) bits 9:0 ain3 sample contains sample of ain3 if external signal sampling is enabled (r0xe3:0[15] = 1). see ?analog inputs ain1?ain3? on page 134. r225?0xe1 - ain2 sample (r/o) bits 9:0 ain2 sample contains sample of ain2 if external signal sampling is enabled (r0xe3:0[15] = 1). r226?0xe2 - ain1 sample (r/o) bits 9:0 ain1 sample contains sample of ain1 if external signal sampling is enabled (r0xe3:0[15] = 1). table 5: sensor register description (continued) bit field description default (hex) sync?d to frame start bad frame www.datasheet.co.kr datasheet pdf - http://www..net/
pdf: 09005aef8202ec2e/source: 09005aef8202ebf7 micron technology, inc., reserves the right to change products or specifications without notice. MT9D111__3_rev5.fm - rev. a 2/06 en 42 ?2004 micron technology, inc. all rights reserved. MT9D111 - 1/3.2-inch 2-megapixel soc digital image sensor registers micron confidential and proprietary note: 1 see ?flash strobe? on page 131. 2 unless integration time is less than one frame. 3 f enabled by bit 3, 4 causes current frame to stop if triggered during a frame. r227?0xe3 - external signal sampling control (r/w) bit 15 enable sampling 1 ? enable external signal sampling. 0 ? disable external signal sampling. 0 n n bit 14 show sample if external sampling is enabled (r0xe3:0[15] = 1): 1 ? show external signal sample s in the data stream after line_valid goes low. 0 ? don?t show external signal samples in data stream. 0 n n r240?0xf0 - page register (r/w) bits 2:0 page register must be kept at ?0? to be able to write/read from sensor. used in soc to access ot her pages with registers. 0 n n r241?0xf1 - bytewise address (r/w) bits 15:0 bytewise address special address to perform 16-bit reads and writes to the sensor in 8-bit chunks. see ?8-bit write sequence? on page 183. 0 n n r242?0xf2 - context control (r/w) bit 15 restart setting this bit causes the se nsor to abandon the current frame and start resetting the first row. same physical register as r0x0d:0[1]. 0 n ym bit 7 xenon flash enable enable xenon flash. same phys ical register as r0x23:0[13]. 0 y n bit 3 read mode select 1 ? use read mode context b, r0x20:0. 0 ? use read mode context a, r0x21:0. bits only found in read mode context b register are always taken from that register. 1 y ym bit 2 led flash enable enable led flash. same physic al register as r0x23:0[8]. 0 y y bit 1 vertical blank select 1 ? use vertical blanking context b, r0x06:0. 0 ? use vertical blanking context a, r0x08:0. 1 y ym bit 0 horizontal blank select 1 ? use horizontal blanking context b, r0x05:0. 0 ? use horizontal blanking context a, r0x07:0. 1 y ym r255?0xff - reserved (r/o) bits 15:0 reserved reserved. 1519 table 5: sensor register description (continued) bit field description default (hex) sync?d to frame start bad frame www.datasheet.co.kr datasheet pdf - http://www..net/
pdf: 09005aef8202ec2e/source: 09005aef8202ebf7 micron technology, inc., reserves the right to change products or specifications without notice. MT9D111__4_rev5.fm - rev. b 2/06 en 43 ?2004 micron technology, inc. all rights reserved. MT9D111 - 1/3.2-inch 2-megapixel soc digital image sensor ifp registers, page 1 micron confidential and proprietary ifp registers, page 1 table 6: ifp registers, page 1 reg # bits default name 8 0x08 10:0 0x01f8 color pipeline control 00 toggles the assumption about bayer cfa (vertical shift). 0 ? row containing blue comes first. 1 ? row with red comes first. 10 toggles the assumption about bayer cfa (horizontal shift). 0 ? green comes first. 1 ? red or blue comes first. 20 1 = enable lens shading correction. 31 1 = enable on-the-fly defect correction. 41 1 = enable 2d aperture correction. 51 1 = enable color correction. 0 = bypass color correcti on (unity color matrix). 61 1 = invert output pixe l clock (in all modes - j peg, soc, sensor). 71 1 = enable gamma correction. 81 1 = enable decimator. 90 1 = enable minblank. allows len generation 2 li nes earlier. also adds 4 pixels to the line size. 10 0 1 = enable 1d aperture correction. 9 0x09 4:0 0x000a factory bypass 1:0 1 data output bypass. se lects data going to d out pads. 00 = 10-bit sensor. 01 = soc. 10 = j peg and output fifo (no bypa ss). reg16 and reg17 (page 2) have to be set to the correct output frame size. 11 = reserved. 20 reserved. 4:3 1 gpio output bypass. 00 = gpio. 01 = flash is output on gpio11. 10 = reserved. 11 = reserved. www.datasheet.co.kr datasheet pdf - http://www..net/
pdf: 09005aef8202ec2e/source: 09005aef8202ebf7 micron technology, inc., reserves the right to change products or specifications without notice. MT9D111__4_rev5.fm - rev. b 2/06 en 44 ?2004 micron technology, inc. all rights reserved. MT9D111 - 1/3.2-inch 2-megapixel soc digital image sensor ifp registers, page 1 micron confidential and proprietary 10 0x0a 10:0 0x0488 pad slew 2:0 0 in bypass mode (r9[1:0] = 2): slew rate for d out [7:0], pixclk, frame_valid, and line_valid. during normal operatio n, the slew of listed pads is set by j peg configuration registers. actual slew depends on load, temperature, and i/o voltage. set this register based on customers? characte rization results. 31 unused. 6:4 0 slew rate for gpio[11:0]. actual slew depends on load, temperature, and i/o voltage. set this register based on customers? characterization results. 70 1 = enable i/o pad input clamp during stand by.that prevents elevat ed standby current if pad input floating. the pads are gpio[11:0], d out [7:0], frame_valid, line_valid, pixclk. 0 = disable i/o pad input clamp. set this bit to ?1? before going to soft/hard standby to reduce the leakage current. wh en coming out of standby, set this bit back to ?0.? if none of the gpios are used as inpu ts, this bit can be left at ?1.? 10:8 4 slew rate for s data . 7 = fastest slew; 0 = slowest. actual slew depends on load, temperature, and i/o voltag e. actual slew depends on load, temperature, and i/o voltage. set this register based on customers? characte rization results. 11 0x0b 8:0 0x00df internal clock control 01 reserved. 11 reserved. 21 reserved. 31 1 = enable output fifo clock. 41 1 = enable j peg clock. 50 reserved. 61 reserved. 71 1 = enable gpio clock. 80 reserved. 17 0x11 10:0 0x0000 x0 coordinate for crop window use the crop window for pan and zoom. crop coordinate s are updated synchronously with frame enable, unless freeze is enabled. in preview mo de crop coordinates are automati cally divided by x skip factor. coordinates are specified as (x0, y0) and (x1, y1), where x0 < x1 and y0 < y1. value is overwritten by mode driver (id = 7). 18 0x12 10:0 0x0640 x1 coordinate for crop window +1 see r17:1. value is overwritte n by mode driver (id = 7). 19 0x13 10:0 0x0000 y0 coordinate for crop window see r17:1. value is overwritte n by mode driver (id = 7). 20 0x14 10:0 0x04b0 y1 coordinate for crop window +1 see r17:1. value is overwritte n by mode driver (id = 7). table 6: ifp registers, page 1 (continued) reg # bits default name www.datasheet.co.kr datasheet pdf - http://www..net/
pdf: 09005aef8202ec2e/source: 09005aef8202ebf7 micron technology, inc., reserves the right to change products or specifications without notice. MT9D111__4_rev5.fm - rev. b 2/06 en 45 ?2004 micron technology, inc. all rights reserved. MT9D111 - 1/3.2-inch 2-megapixel soc digital image sensor ifp registers, page 1 micron confidential and proprietary 21 0x15 13:0 0x0000 decimator control 00 reserved. 10 reserved. 20 high precision mode. additional bits for result are stored. can only be used for decimation > 2. 30 reserved. 40 enable 4:2:0 mode. 5:6 0 reserved. this register controls operation of the decimato r. value is overwritten by mode driver (id=7). 22 0x16 12:0 0x0800 weight for horizontal decimation x output = int (x input/2048*reg. value). value is calculated and overwritten by mode driver (id = 7). 23 0x17 12:0 0x0800 weight for vertical decimation y output = int (y input/2048*reg. value). value is calculated and overwritten by mode driver (id = 7). inputsize is defined by registers 17?20. minimal outp ut size supported by the decimator is 3 x 1 pixel. 32 0x20 15:0 0xc814 luminance range of pixels considered in wb statistics 7:0 20 lower limit of lumina nce for wb statistics. 15:8 200 upper limit of lumina nce for wb statistics. in order to avoid skewing wb statistics by very dark or very bright values, this register allo ws programming the luminance range of pixels to be used for wb computation. 45 0x2d 15:0 0x5000 right/left coordinates of awb measurement window 7:0 0 left window boundary. 15:8 80 right window boundary. this register specifies the right/left coordinates of the window used by awb meas urement engine. the values programmed in the registers are de sired boundaries divided by 8. 46 0x2e 15:0 0x3c00 bottom/top coordinates of awb measurement window 7:0 0 top window boundary. 15:8 60 bottom window boundary. this register specifies the bottom/top coordinates of th e window used by awb meas urement engine. the values programmed in the registers are de sired boundaries divided by 8. 48 0x30 7:0 r/o red chrominance measure calculated by awb this register contains a measure of red chrominance ob tained using awb measuremen t algorithm. the measure is normalized to an arbitrary maxi mum value; the same for r48:1, r4 9:1, and r50:1. because of this normalization, only the ratios of values of registers r48:1 r49:1, and r50:1 should be used. 49 0x31 7:0 r/o luminance measure calculated by awb this register contains a measure of image luminance obtained using awb measurem ent algorithm. the measure is normalized to an arbitrary maxi mum value; the same for r48:1, r4 9:1, and r50:1. because of this normalization, only the ratios of values of re gisters r48:1, r49: 1, and r50:1 should be used. 50 0x32 7:0 r/o blue chrominance measure calculated by awb this register contains a measure of blue chrominance obtained using awb measurem ent algorithm. the measure is normalized to an arbitrary maxi mum value; the same for r48:1, r4 9:1, and r50:1. because of this normalization, only the ratios of values of re gisters r48:1, r49: 1, and r50:1 should be used. 53 0x35 15:0 0x1208 1d aperture correction parameters 7:0 8 ap_knee; threshold fo r aperture signal. 10:8 2 ap_gain; gain for aperture signal. 13:11 2 ap_exp; exponent for gain for aperture signal. table 6: ifp registers, page 1 (continued) reg # bits default name www.datasheet.co.kr datasheet pdf - http://www..net/
pdf: 09005aef8202ec2e/source: 09005aef8202ebf7 micron technology, inc., reserves the right to change products or specifications without notice. MT9D111__4_rev5.fm - rev. b 2/06 en 46 ?2004 micron technology, inc. all rights reserved. MT9D111 - 1/3.2-inch 2-megapixel soc digital image sensor ifp registers, page 1 micron confidential and proprietary 54 0x36 15:0 0x1208 2d aperture correction parameters 7:0 8 ap_knee; threshold fo r aperture signal. 10:8 2 ap_gain; gain for aperture signal. 13:11 2 ap_exp; exponent for gain for aperture signal. 14 0 reserved. defines 2d aperture gain and threshold. 55 0x37 7:0 0x080 filters 2:0 0 uv filter: 000 ? no filter 001 ? 11110 averaging filter 010 ? 01100 averaging filter 011 ? 01210 averaging filter 100 ? 12221 averaging filter 101 ? median 3 110 ? median 5 111 ? reserved 4:3 0 y filter mode: 00 ? no filter 01 ? median 3 10 ? median 5 11 ? reserved 50 permanently enable y filter. 59 0x3b 9:0 0 second black level this register contains the value subtracted by ifp from pixel values prior to ccm. if the subtraction produces a negative result for a part icular pixel, the value of this pixel is set to ?0.? 60 0x3c 9:0 42 first black level this register contains the value subtracted by ifp from raw pixel values before appl ying lens shading correction and digital gains. if the subtraction prod uces a negative result for a particular pixel, the value of this pixel is set to ?0.? typically, the subtracted value should be equal to the bl ack level targeted by the sensor. this value is subtracted from all test patterns as well. 67 0x43 01 enable support for preview modes 1- enable. enable automatic recalculation operation of coefficient lens correction dependent on sensor output resolution. 68 0x44 15:0 n/a mirrors sensor register 0x20 read only 69 0x45 15:0 n/a mirrors sensor register 0xf2 read only 70 0x46 15:0 n/a mirrors sensor register 0x21 read only 71 0x47 7:0 16 edge threshold for interpolation threshold for identifying pixel neighborhood as having an edge. table 6: ifp registers, page 1 (continued) reg # bits default name www.datasheet.co.kr datasheet pdf - http://www..net/
pdf: 09005aef8202ec2e/source: 09005aef8202ebf7 micron technology, inc., reserves the right to change products or specifications without notice. MT9D111__4_rev5.fm - rev. b 2/06 en 47 ?2004 micron technology, inc. all rights reserved. MT9D111 - 1/3.2-inch 2-megapixel soc digital image sensor ifp registers, page 1 micron confidential and proprietary 72 0x48 2:0 0 test pattern 2:0 0 test mode. 001 ? flat field; rgb values are specified in r73-75:1 010 ? vertical monochrome ramp 011 ? vertical color bars 100 ? vertical monochrome bars; set ba r intensity in r73:1 and r74:1 101 ? pseudo-random test pattern 110 ? horizontal monochrome bars; set bar intensity in r73:1 and r74:1 injects test pattern into be ginning of color pipeline. 73 0x49 9:0 256 test pattern r/monochrome value 74 0x4a 9:0 256 test pattern g/monochrome value 75 0x4b 9:0 256 test pattern b value 78 0x4e 7:0 32 digital gain 2 default setting 32 corresponds to gain value of 1. gain scales linearly with value. 96 0x60 14:0 0x2923 color correction matrix exponents for c11..c22 2:0 ? matrix element 1 (c11) exponent 5:3 ? matrix element 2 (c12) exponent 8:6 ? matrix element 3 (c13) exponent 11:9 ? matrix element 4 (c21) exponent 14:12 ? matrix element 5 (c22) exponent 97 0x61 11:0 0x0524 color correction matrix exponents for c22..c33 2:0 ? matrix element 6 (c23) exponent 5:3 ? matrix element 7(c31) exponent 8:6 ? matrix element 8(c32) exponent 11:9 ? matrix element 9(c33) exponent the value of a matrix coefficient is calculated cij=(1 - 2*sij)*mij*2^-(eij + 4), 0< = eij < = 4 here sij is coefficient?s sign, mij is the mantissa and eij is the exponent. 98 0x62 15:0 0xbbc8 color correction matrix elements 1 and 2 mantissas 7:0 200 color correction ma trix element 1 (c11). 15:8 187 color correction ma trix element 2 (c12). 99 0x63 15:0 0xca3a color correction matrix elements 3 and 4 mantissas 7:0 58 color correction ma trix element 3 (c13). 15:8 202 color correction ma trix element 4 (c21). 100 0x64 15:0 0x3b85 color correction matrix elements 5 and 6 mantissas 7:0 133 color correction ma trix element 5 (c22). 15:8 59 color correction ma trix element 6 (c23). 101 0x65 15:0 0xf26f color correction matrix elements 7 and 8 mantissas 7:0 111 color correction ma trix element 7 (c31). 15:8 242 color correction ma trix element 8 (c32). table 6: ifp registers, page 1 (continued) reg # bits default name www.datasheet.co.kr datasheet pdf - http://www..net/
pdf: 09005aef8202ec2e/source: 09005aef8202ebf7 micron technology, inc., reserves the right to change products or specifications without notice. MT9D111__4_rev5.fm - rev. b 2/06 en 48 ?2004 micron technology, inc. all rights reserved. MT9D111 - 1/3.2-inch 2-megapixel soc digital image sensor ifp registers, page 1 micron confidential and proprietary 102 0x66 13:0 0x3d9c color correction matrix element 9 mantissa and signs 7:0 156 color correction ma trix element 9 (c33). 13:8 61 signs for off-diag onal ccm elements. bit 8 ? sign for c12 bit 9 ? sign for c13 bit 10 ? sign for c21 bit 11 ? sign for c23 bit 12 ? sign for c31 bit 13 ? sign for c32 1 ? indicates negative 0 ? indicates positive signs for c11, c22, and c33 are assumed always positive. 106 0x6a 9:0 128 digital gain 1 for red pixels default setting 128 corresponds to gain valu e of 1. gain scales linearly with value. 107 0x6b 9:0 128 digital gain 1 for green1 pixels default setting 128 corresponds to gain valu e of 1. gain scales linearly with value. 108 0x6c 9:0 128 digital gain 1 for green2 pixels default setting 128 corresponds to gain valu e of 1. gain scales linearly with value. 109 0x6d 9:0 128 digital gain 1 for blue pixels default setting 128 corresponds to gain valu e of 1. gain scales linearly with value. 110 0x6e 9:0 128 digital gain 1 for all colors write 128 to set all gains (r106-r109) to 1. wh en read, this register returns the value of r107. 122 0x7a 15:0 80 boundaries of flicker measur ement window (left/width) 7:0 80 window width. 15:8 0 left window boundary. this register specifies the boundari es of the window used by the flicker measurement engine. the values programmed in the registers are the desired boundaries divided by 8. 123 0x7b 15:0 0x0088 boundaries of flicker measur ement window (top/height) 5:0 8 window height. 15:6 2 top window boundary. this register specifies the boundaries of the window used by the flic ker measurement engine. 124 0x7c 15:0 5120 flicker measurement window size this register specifies the number of pixels in the window used by the flicker measurement engine. 125 0x7d 15:0 r/o measure of average luminance in flicker measurement window 150 0x96 00 blank frames 00 1 = blank outgoing frames. when set, cu rrent frame completes and following frames are not output, fen = len = 0. when unset, output resume s with the next frame. the bit is synchronized with frame enable. see freeze bit (r152[7]). table 6: ifp registers, page 1 (continued) reg # bits default name www.datasheet.co.kr datasheet pdf - http://www..net/
pdf: 09005aef8202ec2e/source: 09005aef8202ebf7 micron technology, inc., reserves the right to change products or specifications without notice. MT9D111__4_rev5.fm - rev. b 2/06 en 49 ?2004 micron technology, inc. all rights reserved. MT9D111 - 1/3.2-inch 2-megapixel soc digital image sensor ifp registers, page 1 micron confidential and proprietary 151 0x97 7:0 0 output format configuration 00 in yuv output mode, swaps cb and cr channels. in rgb mode, swaps r and b. this bit is subject to sy nchronous update. 10 swaps chrominance byte with luminance byte in yuv output. in rgb mode, swaps odd and even bytes. this bit is subject to synchronous update. 20 reserved. 30 monochrome output. 40 1 = use itu-r bt.601 codes when bypassing fifo. (0xab = frame start; 0x80 = line start; 0x9d = line end; 0xb6 = frame end.) 50 1 = output rgb (see r151[7:6]) 0 = output yuv 7:6 0 rgb output format: 00 = 16-bit rgb565 01 = 15-bit rgb555 10 = 12-bit rgb444x 11 = 12-bit rgbx444 152 0x98 2:0 0 output format test 00 1 = disable cr channel (r in rgb mode). 10 1 = disable y channel (g in rgb mode). 20 1 = disable cb channel (b in rgb mode). 5:3 0 test ramp output: 00 ? off 01 ? by column 10 ? by row 11 ? by frame 60 1 = enable 8+2 bypass. 70 1 = freeze update soc registers af fecting output size and format. these include r151:1, r17-23:1. 153 0x99 11:0 r/o line count 154 0x9a 15:0 r/o frame count 164 0xa4 15:0 0x6440 special effects 2:0 0 special effect selection bits: 0 ? disabled 1 ? monochrome 2 ? sepia 3 ? negative 4 ?s olarization with unmodified uv 5 ? solarization with -uv 5:3 0 dither enable and amplitude. valid values are 1..4, others disable. 61 1 = dither only in luma channel, 0 = dither in all color channels. 15:8 0 solarization thresh old for luma, divided by 2; 64..127. 165 0xa5 15:0 0xb023 sepia constants 7:0 35 sepia constant for cr. 15:8 176 sepia constant for cb. table 6: ifp registers, page 1 (continued) reg # bits default name www.datasheet.co.kr datasheet pdf - http://www..net/
pdf: 09005aef8202ec2e/source: 09005aef8202ebf7 micron technology, inc., reserves the right to change products or specifications without notice. MT9D111__4_rev5.fm - rev. b 2/06 en 50 ?2004 micron technology, inc. all rights reserved. MT9D111 - 1/3.2-inch 2-megapixel soc digital image sensor ifp registers, page 1 micron confidential and proprietary 178 0xb2 15:0 0x2700 gamma curve knees 0 and 1 7:0 ordinate of gamma curve knee point 0 (its abscissa is 0). 15:8 gamma curve knee point 1. gamma correction curve is implemented in the mt9d1 11 as a piecewise linear function mapping 12-bit arguments to 8-bit output. seventeen line fragments fo rming the curv e connect 19 knee poin ts, whose abscissas are fixed and ordinates are programmable through registers r[178:187]:1. the abscissas of the knee points are 0, 64, 128, 256, 512, 768, 1024, 1280, 1536, 1792, 2048, 2304, 2560, 2816, 3072, 3328, 3584, 3840, and 4095. ordinates of knee points written direct ly to the registers r[178:187]:1 may be overwritten by mode driver (id=7). the recommended way to program a gamma curve into the MT9D111 is to write desired knee ordinates to one of the two mode.gamma_table[a /b][] arrays that hold gamma curves used in contexts a and b. once the desired ordinates are in one of those arrays, all that is needed to put them into effect (i.e. into the registers) is a short command telling the sequence r to go to proper context or through refresh loop. 179 0xb3 15:0 0x4936 gamma curve knees 2 and 3 7:0 gamma curve knee point 2. 15:8 gamma curve knee point 3. 180 0xb4 15:0 0x7864 gamma curve knees 4 and 5 7:0 gamma curve knee point 4. 15:8 gamma curve knee point 5. 181 0xb5 15:0 0x9789 gamma curve knees 6 and 7 7:0 gamma curve knee point 6. 15:8 gamma curve knee point 7. 182 0xb6 15:0 0xb0a4 gamma curve knees 8 and 9 7:0 gamma curve knee point 8. 15:8 gamma curve knee point 9. 183 0xb7 15:0 0xc5bb gamma curve knees 10 and 11 7:0 gamma curve knee point 10. 15:8 gamma curve knee point 11. 184 0xb8 15:0 0xd7ce gamma curve knees 12 and 13 7:0 gamma curve knee point 12. 15:8 gamma curve knee point 13. 185 0xb9 15:0 0xe8e0 gamma curve knees 14 and 15 7:0 gamma curve knee point 14. 15:8 gamma curve knee point 15. 186 0xba 15:0 0xf8f0 gamma curve knees 16 and 17 7:0 gamma curve knee point 16. 15:8 gamma curve knee point 17. 187 0xbb 7:0 0x00ff gamma curve knee 18 190 0xbe 3:0 6 yuv/ycbcr control 30 clips y values to 16?235; clips uv values to 16?240. 21 adds 128 to u and v values. 11 1 = itu-r bt.601 coefficients 0 = use srgb coefficients. 00 0 = no scaling 1 = scales y data by 219/256 and uv data by 224/256. table 6: ifp registers, page 1 (continued) reg # bits default name www.datasheet.co.kr datasheet pdf - http://www..net/
pdf: 09005aef8202ec2e/source: 09005aef8202ebf7 micron technology, inc., reserves the right to change products or specifications without notice. MT9D111__4_rev5.fm - rev. b 2/06 en 51 ?2004 micron technology, inc. all rights reserved. MT9D111 - 1/3.2-inch 2-megapixel soc digital image sensor ifp registers, page 1 micron confidential and proprietary 191 0xbf 15:0 0 y/rgb offset 15:8 0 y offset. 7:0 0 rgb offset. 195 0xc3 15:0 0 microcontroller boot mode 00 1 = reset microcontroller. 1,2,3,6:4, 6:5,7:5 0 reserved. 70 microcontroller debug indicator. 11:8,12,13, 14,15 r/o reserved. 198 0xc6 15:0 0 microcontroller variable address 7:0 0 bits 7:0 of address for physical access; driver variable offs et for logical access. 12:8 0 bits 12:8 of address for physical ac cess; driver id for logical access. 14:13 0 bits 14:13 of address for physical access; r198:1[14:13] = 01 select logical access. 15 0 1 = 8-bit access; 0 = 16-bit. microcontroller variables are similar to two-wire serial interface registers, except that they are located in the microcontroller?s memory and have different bit widt hs. registers 198:1 and r200:1 provide easy access to variables that can be represented as 8- or 16-bit unsigned integers (bytes or words). to access such a variable, one must write its address to r198:1 and then read its value from r200:1 or wr ite a new value to the same register. variables having more than 16 bits (e .g. 32-bit unsigned long integers) must be accessed as arrays of bytes or words - there is no way to read or wr ite their values without parsing. vari able address written to r198:1 can be physical or logical. physical address is the actual address of a byte or word in the microcontrolle r's address space. physical addresses can be used in many manipulations of memory content, fo r example, to upload custom binary code to a specific ram segment. the logical addressing option is provided only to facilitate access to public variables of various firmware drivers. logical address of a public variable consists of a 5-bit driver id (0 = monitor, 1 = sequencer, etc.) and 8-bit offset of the variable in the driver?s data structure (which cannot be larger than 256 bytes). 200 0xc8 15:0 0 microcontroller variable data to read current value of an 8- or 16 -bit variable from microcontroller me mory, write its address to r198:1 and read r200:1. to change value of a variable, write its ad dress to r198:1 and its new value to r200:1. when bit width of a variable is specified as 8 bi ts (r198:1[15]=1), the upper byte of r200:1 is irrelevant. it is set to ?0? when the register is read and ignored when it is written to . see r198:1 above for explan ation how to read and set variables having more than 16 bits. 201-209 0xc9- d1 15:0 0 microcontroller variable data using burst two-wire serial interface access use these registers to read or write up to 16 bytes of va riable data using the burst two-wire serial interface access mode. the variables must have consecutive addresses. 240 0xf0 2:0 1 page register 0 = sensor core 1 = ifp page 1 2 = ifp page 2 241 0xf1 15:0 0 bytewise address special address to perform 16-bit reads and writes to the sensor in 8-bit chunks. see ?8-bit write sequence? on page 183. table 6: ifp registers, page 1 (continued) reg # bits default name www.datasheet.co.kr datasheet pdf - http://www..net/
pdf: 09005aef8202ec2e/source: 09005aef8202ebf7 micron technology, inc., reserves the right to change products or specifications without notice. MT9D111__4_rev5.fm - rev. b 2/06 en 52 ?2004 micron technology, inc. all rights reserved. MT9D111 - 1/3.2-inch 2-megapixel soc digital image sensor ifp registers, page 2 micron confidential and proprietary ifp registers, page 2 table 7: ifp registers, page 2 reg # bits default name 0 0x00 15:0 0 jpeg control register 00 start/enable encoder: enable j peg encoding at the start of next frame. 10 test sram: when set, allows ho st or microcontroller to take control of the output fifo buffer and the sixteen 800 x 16 rams in the re-o rder buffer for testing. used in conjunction with j peg ram test controls register to simultan eously write all 17 ra ms and individually read each ram. [14:2] return zero when read. 15 0 soft reset. 2 0x02 15:0 0 jpeg status register 0 00 transfer done status flag. when asserted, it in dicates that the completi on of transfer of the j peg-compressed image. this status flag re mains set until cleared by the host or microcontroller by writing ?1? to bit [0]. subsequently, the output fifo overflow, the spoof oversize error and the re-order buffer error st atus bits are reset. the output buffer clock must be present to clear this bit. 10 output fifo overflow status fl ag. when asserted, it indicates that an overflow condition was detected in the output fifo during the frame transfer and that transfer was terminated prematurely. this status flag remains set until cleared by the host or microcontroller as it clears tr ansfer done flag. valid for j peg compressed images only. 20 spoof oversize error statu s flag. when asserted, it indicates that the spoof frame size is too small for j peg data stream. this status flag rema ins set until cleared by the host or microcontroller as it clears tr ansfer done flag. valid for j peg compressed images only. 30 re-order buffer error status flag: when the re-order buffer detects an overflow or underflow condition, this bit is se t to ?1.? this bit is cleared by writing a ?1? to bit[0] of this register. 5:4 0 watermark of the output fifo. 00 ? less than 25% full 01 ? 25% to less than 50% full 10 ? 50% to less than 75% full 11 ? 75% full or more watermark is cleared when the ho st or microcontroller writes ?1? to bit 4 of this register (r258). 7:6 0 qtable_id. 00 ? quantization table set 0 01 ? quantization table set 1 10 ? quantization table set 2 11 ? reserved 15:8 0 j peg data length bits 23:16. highest byte of 24-bit j peg data length. 3 0x03 15:0 0 jpeg status register 1 - jpeg data length bits 15:0 this register combined with r2:2[15:8] gives the total number of data bytes successfully encoded ? a 24-bit j peg data length. if an output fifo overflow occurs, this register holds the total number of data bytes already sent out by the j peg encoder (up to the point where the overflow occurs). 4 0x04 2:0 0 jpeg status register 2 - output fifo fullness status instantaneous fifo fullness status code: 000 ? fifo is empty 001 ? 0% < fullness < 25% 011 ? 25% <= fullness < 50% 010 ? 50% <= fullness < 75% 110 ? 75% <= fullness <= 100% www.datasheet.co.kr datasheet pdf - http://www..net/
pdf: 09005aef8202ec2e/source: 09005aef8202ebf7 micron technology, inc., reserves the right to change products or specifications without notice. MT9D111__4_rev5.fm - rev. b 2/06 en 53 ?2004 micron technology, inc. all rights reserved. MT9D111 - 1/3.2-inch 2-megapixel soc digital image sensor ifp registers, page 2 micron confidential and proprietary 5 0x05 5:0 0 jpeg front end configuration register 00 color component composition: 0 ? 4:2:2 format 1 ? 4:2:0 format 10 j peg monochrome mode. when this bit is set, the re-order bu ffer control sends only luma data to the j peg encoder. 6 0x06 0:0 0 jpeg core configuratio n register - extend jpeg quantization matrix presently, the j peg encoder core supports two sets of quantiza tion tables. (each set contains a pair of quantization tables - one for luma, on e for chroma.) the quantization memory available allows an additional set of quantization tables to be stored. by setting this bit, the encoder uses the third table pair. if reset, then whichever set of tables 1 and 2 was programmed. 10 0x0a 0:0 1 jpeg encoder bypass set bit 0 of this register to have un compressed frames from the soc captured in the output fifo and transferred out as spoof frames ( j peg encoder is bypassed). register 13, bit 0, should be set to ?1? for spoof-mode output. when the bit is cleared, j peg-encoded frames are transfe rred out thro ugh the fifo. table 7: ifp registers, page 2 (continued) reg # bits default name www.datasheet.co.kr datasheet pdf - http://www..net/
pdf: 09005aef8202ec2e/source: 09005aef8202ebf7 micron technology, inc., reserves the right to change products or specifications without notice. MT9D111__4_rev5.fm - rev. b 2/06 en 54 ?2004 micron technology, inc. all rights reserved. MT9D111 - 1/3.2-inch 2-megapixel soc digital image sensor ifp registers, page 2 micron confidential and proprietary 13 0x0d 10:0 0x0007 output configuration register 01 enable spoof frame: when this bit is set, the data captured in the output fifo is sent out as a spoofed frame, formatted according to informa tion stored in the various spoof registers. this output mode can be used to output both j peg-compressed and uncompressed image data. j peg data may be padded if dummy data is needed. during line_valid assertion period, the output clock is only clocked when there is valid j peg data or padded dummy data to be transmitted. this may result in a non-uniform clock period. when line_valid is de-asserted, the output clock is enabled according to spoof_lv_lead and spoof_lv_trail setting. j peg soi/eoi markers cannot be inserted into spoof frames. 11 enable output pixel clock betwee n frames: when set, this bit enables the pixel clock to run whether frame_valid is low or high. clearing the bit disables the clock during the periods when frame_valid is de-asserted exce pt for soi/eoi markers transmission if they are outside the fv assertion period. the gating off of this output pixel clock saves power. 21 enable pixel clock during invalid data: when this bit is set, the pixel clock runs continuously while frame_valid is asserted but line_valid is de-asserted. when cleared, it causes the pixel clock to be active only when valid j peg data are output. disabling pixel clock during line_valid de-assertion is not support in spoof frame. 30 enable soi/eoi insertion: when set, this bit ca uses soi and eoi markers to be output at the beginning and end of every j peg-encoded frame. when th e bit is cleared, only j peg data bytes are output. 40 insert soi and eoi when frame_va lid is high: when it is ?1,? soi and eoi are inside fv assertion period. when it is?0,? soi, and eo i are outside frame_valid assertion period. this bit is relevant only when soi/eoi insertion is enabled. 50 ignore spoof frame height: this bit is used in conjunction with bit 0 that enables spoof framing. when this bit is set, the j peg unit output section ignores the spoof frame height register. the spoof frame ends when either j peg bytes or uncompre ssed image data are exhausted. both kinds of data are always padded with dummy data to the programmed spoof frame width. 60 enable variable pixel clock rate : setting this bit enables the adaptive pixel clock frequency feature. the pixel clock is switched from pclk1 to pclk2 to pclk3, depending on the output fifo fullness. when fullness reaches 50%, the pixel clock is switched from pclk1 to pclk2. when the fullness reaches 75%, the clock is switched to pclk3. as the fifo fullness drops below 50%, pixclk switches from pclk3 to pclk2; as it drops below 25%, it switches back to pclk1. at the start of a fram e, it always starts with pclk1. 70 enable byte swap: toggling this bi t swaps the even and odd bytes in j peg data stream. byte swapping supported only when enable spoof frame is set. table 7: ifp registers, page 2 (continued) reg # bits default name www.datasheet.co.kr datasheet pdf - http://www..net/
pdf: 09005aef8202ec2e/source: 09005aef8202ebf7 micron technology, inc., reserves the right to change products or specifications without notice. MT9D111__4_rev5.fm - rev. b 2/06 en 55 ?2004 micron technology, inc. all rights reserved. MT9D111 - 1/3.2-inch 2-megapixel soc digital image sensor ifp registers, page 2 micron confidential and proprietary 80 duplicate frame_valid on line _valid: when this bit is se t, the frame_valid waveform is output on line_valid output also ; therefore, the two are identical. 90 enable status insertion: wh en this bit is set, the j peg module appends the status byte to the end of the j peg byte stream. this register should only be set when transferring in continuous mode. the status byte inserted at the end of the j peg byte stream is reg2 bit [7:0]. 10 0 enable spoof itu-r bt.601 codes: this bit is relevant matters when uncompressed frames are output in the spoof mode. when set, the bi t causes the itu-r bt.601 markers sof, eof, sol, eol to be inserted into every frame. codes are: start of frame: ff0000ab end of frame: ff0000b6 start of line: ff000080 end of line: ff00009d 11 0 freeze_update; default = 0. when set, it disables the transfer of values from registers 0x0a, 0x0d (except freeze_update), 0x0e, 0x0f, 0x10, 0x11, 0x12 in to their corresponding shadow registers. when cleared, the shadow re gisters are updated with values from their corresponding configuration registers at the end of vertical blanking of the input image. the shadow registers allow the microcontroll er to change configuration registers values during the active frame time wi thout corrupting the cu rrent frame transfer. 14 0x0e 15:0 0x0501 output pclk1 & pclk2 configuration register 3:0 0x1 output clock frequency divisor n1: this 4-bit re gister contains an integer divisor used to divide master clock frequency to obtain the frequency of output clock source pclk1. a value of ?0? in this register has the same effect as ?1.? 7:5 0 pclk1 slew rate: the va lue contained in this 3-bit registe r determines the slew rate of the output clock when pclk1 is selected as its source. 11:8 0x5 output clock frequency divisor n2 : this 4-bit register contains an integer divisor used to divide master clock frequency to obtain the frequency of output clock source pclk2. the output clock switches from pclk1 to pclk2 when the output buffer fullness reaches 50%. a value of ?0? in this register has the same effect as ?1.? 12 0 not used. 15:13 0 pclk2 slew rate: the va lue contained in this 3-bit registe r determines the slew rate of the output clock when pclk2 is selected as its source. 15 0x0f 7:0 0x0003 output pclk3 configuration register 3:0 0x03 output clock frequency divisor n3: this 4-bit re gister contains an integer divisor used to divide master clock frequency to obtain the frequency of output clock source pclk3. the output clock switches from pclk2 to pclk3 wh en the output buffer fullness reaches 75 %. a value of ?0? in this register has the same effect as 1. 40 not used. 7:5 0 pclk3 slew rate: the va lue contained in this 3-bit registe r determines the slew rate of the output clock when pclk3 is selected as its source. 16 0x10 11:0 0x0640 spoof frame width this register defines the width of the spoof frame used to output data captured in the output fifo. it corresponds to the number of valid da ta bytes output at each assertion of line_valid. it must be an even number. table 7: ifp registers, page 2 (continued) reg # bits default name www.datasheet.co.kr datasheet pdf - http://www..net/
pdf: 09005aef8202ec2e/source: 09005aef8202ebf7 micron technology, inc., reserves the right to change products or specifications without notice. MT9D111__4_rev5.fm - rev. b 2/06 en 56 ?2004 micron technology, inc. all rights reserved. MT9D111 - 1/3.2-inch 2-megapixel soc digital image sensor ifp registers, page 2 micron confidential and proprietary 17 0x11 11:0 0x0258 spoof frame height this register defines the height of the spoof frame used to output data capt ured in the output fifo. the height is equal to the number of assertions of line_valid wi thin one assertion of frame_ valid. the value stored in this register is ignored if bit r13:2[5] is set. 18 0x12 15:0 0x0606 spoof frame line timing 7:0 0x6 spoof line_valid lead. the number of clocks before line_valid is asserted in a spoof frame. this must be a minimum value of ?5.? 15:8 0x6 spoof line_valid trail. the number of clocks after line_v alid is de-asserted in a spoof frame. this must be a minimum value of ?5.? 29 0x1d 15:0 0 jpeg ram test control register 9:0 0 tested sram address: this register defines the location in the seventeen 800 x 16 rams that is being accessed by the host or microcontroller while testing the group of srams. a specified 16-bit location can be selected from 0 through 799. the address is automatically incremented when r31:2 is written during sram test data write or read during sram test data read. 12:10 0 test y/c sram register: address the same set of 8 srams (either for y or for c), this register setting identifies which of the 8 sram s is selected. 000 for sram1, 001 for sram2, ?, 111 for sram8. 13 0 test y/c sram select register: select a bank of 8 srams from luminance or from chrominance. y = 1, c = 0. 14 0 test output buffer sram: select to read output buff er sram and supersedes y/c srams. if set, data from the output buffer ram is selected to be read. during data write, this has no effect. 15 0 sram write enable. this bit is used in conjunction with the ram selection register. when this bit is set, the ram specified in the select ion register undergoes a test write cycle. data residing in the indirect data register r31: 2 is loaded into all seventeen 800 x 16 srams simultaneously. resetting the bi t thereafter causes a test read cycle to be performed and the data is read from the srams and loaded back into r31:2. th is bit is write_enable when 1; read_enable when 0. th e read and write cycles occur when r31:2 is accessed. 30 0x1e 15:0 0 jpeg indirect access control register 10:0 0 indirect access address register: this 11-bit re gister contains the addr ess of the register or memory to be accessed indirectly. 12:11 0 unused. 13 0 enable two-wire serial interface burst: when this bit is set, the tw o-wire serial interface decoder operates in burst mode for the in direct data register (read burst and write burst). the longest burst supported is 16 (128 read or write cycles). 14 0 enable indirect writing: when set, data from the indirect data register is written to the indirect address location specifie d by [10:0] of this register except when auto-increment is set. reading the same address locati on when this bit is reset to ?0.? 15 0 address auto-increment: when th is bit is set, the value in the indirect access address register is automatically incremented after every read or write, to the j peg indirect access data register. this feature is used to emulat e a burst access to memory or registers being accessed indirectly. 31 0x1f 15:0 0 jpeg indirect acce ss data register writing to, and reading from this regi ster, is equivalent to performing th ese operations on registers or memory being indirectly accessed. when addr ess auto-increment bit is set in j peg indirect access control register, multiple writes or reads from this register affect a burst data tr ansfer. data is written to or read from indirect registers (when testsram reg 0x0[1] is set to ?0?), or the 800 x 16 srams (when testsram is set to ?1?). table 7: ifp registers, page 2 (continued) reg # bits default name www.datasheet.co.kr datasheet pdf - http://www..net/
pdf: 09005aef8202ec2e/source: 09005aef8202ebf7 micron technology, inc., reserves the right to change products or specifications without notice. MT9D111__4_rev5.fm - rev. b 2/06 en 57 ?2004 micron technology, inc. all rights reserved. MT9D111 - 1/3.2-inch 2-megapixel soc digital image sensor ifp registers, page 2 micron confidential and proprietary 32-46 0x20- 0x2e 15:0 0 jpeg indirect acce ss data register same as r31:2 when doing two -wire serial interface burst. 64 0x40 15:0 0x0f14 boundaries of first af measurement window (top/left) 7:0 left window boundary. 15:8 top window boundary. this register specifies top and left boundaries of the first from 16 (left-to p) window used by af measurement engine. the values programmed in the registers are desired boundaries divided by 8. 65 0x41 15:0 0x1e28 boundaries of first af measurement window (height/width) 7:0 window width. 15:8 window height. this register specifies height and width of the first fro m 16 window used by af measurement engine. the values programmed in the registers are de sired boundaries divided by 2. 66 0x42 15:0 0x12c0 af measurement window size this register specifies number of pixels in the window used by af measurement engine. 67 0x43 15:0 r/o average luminance in af windows w12 and w11 7:0 average y in w11. 15:8 average y in w12. 68 0x44 15:0 r/o average luminance in af windows w14 and w13 7:0 average y in w13. 15:8 average y in w14. 69 0x45 15:0 r/o average luminance in af windows w22 and w21 7:0 average y in w21. 15:8 average y in w21. 70 0x46 15:0 r/o average luminance in af windows w24 and w23 7:0 average y in w23. 15:8 average y in w24. 71 0x47 15:0 r/o average luminance in af windows w32 and w31 7:0 average y in w31. 15:8 average y in w32. 72 0x48 15:0 r/o average luminance in af windows w34 and w33 7:0 average y in w33. 15:8 average y in w34. 73 0x49 15:0 r/o average luminance in af windows w42 and w41 7:0 average y in w41. 15:8 average y in w43. 74 0x4a 15:0 r/o average luminance in af windows w44 and w43 7:0 average y in w43. 15:8 average y in w44. table 7: ifp registers, page 2 (continued) reg # bits default name www.datasheet.co.kr datasheet pdf - http://www..net/
pdf: 09005aef8202ec2e/source: 09005aef8202ebf7 micron technology, inc., reserves the right to change products or specifications without notice. MT9D111__4_rev5.fm - rev. b 2/06 en 58 ?2004 micron technology, inc. all rights reserved. MT9D111 - 1/3.2-inch 2-megapixel soc digital image sensor ifp registers, page 2 micron confidential and proprietary 75 0x4b 15:0 0x028 af filter 1 coefficients 3:0 1 c1. 7:4 0 c2. 11:8 0 c3. 15:12 0 c4. this register specifies coefficient pairs for horizontal filter 1. coefficient pairs c1 - c4 and center coefficient c0 define the filter kernel. filter tap or der is c4, c3, c2, c1, c0,c 1, c2, c3, c4 for odd-length configuration and c4, c3, c2, c1, c1, c2, c3, c4 for even-sized. r76:2[5] cont rols filter symmetry. when ?0? filter the even-length configuration becomes c4, c3, c2, c1, -c1, -c2, -c3, -c4. the filter input is linear luminance from interpolation. filter coefficients are spec ified as unsigned 4-bit nu mbers, 0..15. th eir signs are spec ified in r76:2. 76 0x4c 15:0 0xc0b0 af filter 1 configuration 3:0 0 scale factor 0- 1; 1- /2; 2- /4; 3- /8; 4- /16; 5- /32; 6- /64; 7- /1 28; 8- /256; 9- / 512; 11- *2; 12- *4; 13- *8; 14- *16; 15- *32. 41 1 = odd length (9 taps); 0 = even length (8 taps, c0 ignored). 51 if ?1? filter is symme tric else anti-symmetric. 10:6 0 signs for filter coefficients c4(10):c0(6). 1 = negative, 0 = positive. 15:12 0 c0 coefficient, for the cent er tap in odd-sized filter. if filter coefficients larger than 1, the user must use appropriate scale fact or to avoid overflow. for example, use scale factor /2 for filter 0 0 0 2 -2 0 0 0. 77 0x4d 15:0 r/o af filter 1 average sharpness measure for af windows w12 and w11 7:0 average sharpness in w11 (top left). 15:8 average sharpness in w12. 78 0x4e 15:0 r/o af filter 1 average sharpness measure for af windows w14 and w13 7:0 average sharpness in w13. 15:8 average sharpness in w14 (top right). 79 0x4f 15:0 r/o af filter 1 average sharpness measure for af windows w22 and w21 7:0 average sharpness in w21. 15:8 average sharpness in w22. 80 0x50 15:0 r/o af filter 1 average sharpness measure for af windows w24 and w23 7:0 average sharpness in w23. 15:8 average sharpness in w24. 81 0x51 15:0 r/o af filter 1 average sharpness measure for af windows w32 and w31 7:0 average sharpness in w31. 15:8 average sharpness in w32. 82 0x52 15:0 r/o af filter 1 average sharpness measure for af windows w34 and w33 7:0 average sharpness in w33. 15:8 average sharpness in w34. 83 0x53 15:0 r/o af filter 1 average sharpness measure for af windows w42 and w41 7:0 average sharpness in w41 (bottom left). 15:8 average sharpness in w42. 84 0x54 15:0 r/o af filter 1 average sharpness measure for af windows w44 and w43 7:0 average sharpness in w43. 15:8 average sharpness in w44 (bottom right). table 7: ifp registers, page 2 (continued) reg # bits default name www.datasheet.co.kr datasheet pdf - http://www..net/
pdf: 09005aef8202ec2e/source: 09005aef8202ebf7 micron technology, inc., reserves the right to change products or specifications without notice. MT9D111__4_rev5.fm - rev. b 2/06 en 59 ?2004 micron technology, inc. all rights reserved. MT9D111 - 1/3.2-inch 2-megapixel soc digital image sensor ifp registers, page 2 micron confidential and proprietary 85 0x55 15:0 0x2080 af filter 2 coefficients 3:0 1 c1. 7:4 1 c2. 11:8 1 c3. 15:12 1 c4. see r75:2. 86 0x56 15:0 0xc130 af filter 2 configuration 3:0 0 scale factor. 41 odd/even (9/8) filter size. 51 if ?1? filter is symme tric else anti-symmetric. 10:6 0 signs for filter coefficients c4(10):c0(6). 15:12 0 c0 coefficient. see r76:2. 87 0x57 15:0 r/o af filter 2 average sharpness measure for af windows w12 and w11 7:0 average sharpness in w11. 15:8 average sharpness in w12. 88 0x58 15:0 r/o af filter 2 average sharpness measure for af windows w14 and w13 7:0 average sharpness in w13. 15:8 average sharpness in w14. 89 0x59 15:0 r/o af filter 2 average sharpness measure for af windows w22 and w21 7:0 average sharpness in w21. 15:8 average sharpness in w22. 90 0x5a 15:0 r/o af filter 2 average sharpness measure for af windows w24 and w23 7:0 average sharpness in w23. 15:8 average sharpness in w24. 91 0x5b 15:0 r/o af filter 2 average sharpness measure for af windows w32 and w31 7:0 average sharpness in w31. 15:8 average sharpness in w32. 92 0x5c 15:0 r/o af filter 2 average sharpness measure for af windows w34 and w33 7:0 average sharpness in w33. 15:8 average sharpness in w34. 93 0x5d 15:0 r/o af filter 2 average sharpness measure for af windows w42 and w41. 7:0 average sharpness in w41. 15:8 average sharpness in w42. 94 0x5e 15:0 r/o af filter 2 average sharpness measure for af windows w44 and w43. 7:0 average sharpness in w43. 15:8 average sharpness in w44. table 7: ifp registers, page 2 (continued) reg # bits default name www.datasheet.co.kr datasheet pdf - http://www..net/
pdf: 09005aef8202ec2e/source: 09005aef8202ebf7 micron technology, inc., reserves the right to change products or specifications without notice. MT9D111__4_rev5.fm - rev. b 2/06 en 60 ?2004 micron technology, inc. all rights reserved. MT9D111 - 1/3.2-inch 2-megapixel soc digital image sensor ifp registers, page 2 micron confidential and proprietary 128 0x80 10:0 0x0160 lens correction control 00 sign for the k*f(x)*f(y). if 0, then k is positive; if 1, then k is negative. 10 if 1, all the second x derivatives are doubled. 20 if 1, all the second y derivatives are doubled. 3:5 100 divisor for the first derivative, x direction. 000-/1, 001-/2, 010-/4 , ... 111-/128. also applies to second derivative. 6:8 101 divisor for the first derivative, y direction. 000-/1, 001-/2, 010-/4 , ... 111-/128. also applies to second derivative. 90 shift column, lc specific. 10 0 shift row, lc specific. this register controls be havior of lens correction. 129 0x81 15:0 0x6432 zone boundaries x1 and x2 7:0 x2 boundary (/4) position. 15:8 x1 boundary (/4) position. definition of x1 and x2 boundaries 130 0x82 15:0 0x3296 zone boundaries x0 and x3 7:0 x0 boundary (/4) position. 15:8 x3 boundary (/4) position. definition of x0 and x3 boundaries. 131 0x83 15:0 0x9664 zone boundaries x4 and x5 7:0 x4 boundary (/4) position. 15:8 x5 boundary (/4) position. definition of x4 and x5 boundaries. 132 0x84 15:0 0x5028 zone boundaries y1 and y2 7:0 y2 boundary (/4) position. 15:8 y1 boundary (/4) position. definition of y1 and y2 boundaries. 133 0x85 15:0 0x2878 zone boundaries y0 and y3 7:0 y0 boundary (/4) position. 15:8 y3 boundary (/4) position. definition of y0 and y3 boundaries. 134 0x86 15:0 0x7850 zone boundaries y4 and y5 7:0 y4 boundary (/4) position. 15:8 y5 boundary (/4) position. definition of y4 and y5 boundaries. 135 0x87 15:0 0x0000 center offset 7:0 offset of lc center in respect to geometrical center. x coordinate(/4). 15:8 offset of lc center in respect to geometrical center. ycoordinate(/4). offset of the central point for the lens correct ion (relative to the center of imaging array). 136 0x88 11:0 0x015e f(x) for red color at the first pixel of the array 137 0x89 11:0 0x0143 f(x) for green color at the first pixel of the array 138 0x8a 11:0 0x0127 f(x) for blue color at the first pixel of the array table 7: ifp registers, page 2 (continued) reg # bits default name www.datasheet.co.kr datasheet pdf - http://www..net/
pdf: 09005aef8202ec2e/source: 09005aef8202ebf7 micron technology, inc., reserves the right to change products or specifications without notice. MT9D111__4_rev5.fm - rev. b 2/06 en 61 ?2004 micron technology, inc. all rights reserved. MT9D111 - 1/3.2-inch 2-megapixel soc digital image sensor ifp registers, page 2 micron confidential and proprietary 139 0x8b 11:0 0x012c f(y) for red color at the first pixel of the array 140 0x8c 11:0 0x0103 f(y) for green color at the first pixel of the array 141 0x8d 11:0 0x00fd f(y) for blue color at the first pixel of the array 142 0x8e 11:0 0x0cef df/dx for red color at the first pixel of the array 143 0x8f 11:0 0x0d38 df/dx for green color at the first pixel of the array 144 0x90 11:0 0x0d92 df/dx for blue color at the first pixel of the array 145 0x91 11:0 0x0c18 df/dy for red color at the first pixel of the array 146 0x92 11:0 0x0cf1 df/dy for green color at the first pixel of the array 147 0x93 11:0 0x0d05 df/dy for blue color at the first pixel of the array 148 0x94 15:0 0x0b03 second derivative for zone 0 red color 7:0 d2f/dx2 for zone 0 red color. 15:8 d2f/dy2 for zone 0 red color. second derivative for red color in zone 0. 149 0x95 15:0 0x0000 second derivative for zone 0 green color 7:0 d2f/dx2 for zone 0 green color. 15:8 d2f/dy2 for zone 0 green color. second derivative for green color in zone 0. 150 0x96 15:0 0x0100 second derivative for zone 0 blue color 7:0 d2f/dx2 for zone 0 blue color. 15:8 d2f/dy2 for zone 0 blue color. second derivative for green color in zone 0. 151 0x97 15:0 0x2534 second derivative for zone 1 red color 7:0 d2f/dx2 for zone 1 red color. 15:8 d2f/dy2 for zone 1 red color. second derivative for red color in zone 1. 152 0x98 15:0 0x1c33 second derivative for zone 1 green color 7:0 d2f/dx2 for zone 1 green color. 15:8 d2f/dy2 for zone 1 green color. second derivative for green color in zone 1. 153 0x99 15:0 0x1a2e second derivative for zone 1 blue color 7:0 d2f/dx2 for zone 1 blue color. 15:8 d2f/dy2 for zone 1 blue color. second derivative for green color in zone 1. 154 0x9a 15:0 0x2a3a second derivative for zone 2 red color 7:0 d2f/dx2 for zone 2 red color. 15:8 d2f/dy2 for zone 2 red color. second derivative for red color in zone 2. table 7: ifp registers, page 2 (continued) reg # bits default name www.datasheet.co.kr datasheet pdf - http://www..net/
pdf: 09005aef8202ec2e/source: 09005aef8202ebf7 micron technology, inc., reserves the right to change products or specifications without notice. MT9D111__4_rev5.fm - rev. b 2/06 en 62 ?2004 micron technology, inc. all rights reserved. MT9D111 - 1/3.2-inch 2-megapixel soc digital image sensor ifp registers, page 2 micron confidential and proprietary 155 0x9b 15:0 0x252d second derivative for zone 2 green color 7:0 d2f/dx2 for zone 2 green color. 15:8 d2f/dy2 for zone 2 green color. second derivative for green color in zone 2. 156 0x9c 15:0 0x2823 second derivative for zone 2 blue color 7:0 d2f/dx2 for zone 2 blue color. 15:8 d2f/dy2 for zone 2 blue color. second derivative for green color in zone 2. 157 0x9d 15:0 0x0f14 second derivative for zone 3 red color 7:0 d2f/dx2 for zone 3 red color. 15:8 d2f/dy2 for zone 3 red color. second derivative for red color in zone 3. 158 0x9e 15:0 0x0d20 second derivative for zone 3 green color 7:0 d2f/dx2 for zone 3 green color. 15:8 d2f/dy2 for zone 3 green color. second derivative for green color in zone 3. 159 0x9f 15:0 0x0421 second derivative for zone 3 blue color 7:0 d2f/dx2 for zone 3 blue color. 15:8 d2f/dy2 for zone 3 blue color. second derivative for green color in zone 3. 160 0xa0 15:0 0x0d2a second derivative for zone 4 red color 7:0 d2f/dx2 for zone 4 red color. 15:8 d2f/dy2 for zone 4 red color. second derivative for red color in zone 4. 161 0xa1 15:0 0x1017 second derivative for zone 4 green color 7:0 d2f/dx2 for zone 4 green color. 15:8 d2f/dy2 for zone 4 green color. second derivative for green color in zone 4. 162 0xa2 15:0 0x1617 second derivative for zone 4 blue color 7:0 d2f/dx2 for zone 4 blue color. 15:8 d2f/dy2 for zone 4 blue color. second derivative for green color in zone 4. 163 0xa3 15:0 0x1642 second derivative for zone 5 red color 7:0 d2f/dx2 for zone 5 red color. 15:8 d2f/dy2 for zone 5 red color. second derivative for red color in zone 5. 164 0xa4 15:0 0x1448 second derivative for zone 5 green color 7:0 d2f/dx2 for zone 5 green color. 15:8 d2f/dy2 for zone 5 green color. second derivative for green color in zone 5. 165 0xa5 15:0 0x0f4e second derivative for zone 5 blue color 7:0 d2f/dx2 for zone 5 blue color. 15:8 d2f/dy2 for zone 5 blue color. second derivative for green color in zone 5. table 7: ifp registers, page 2 (continued) reg # bits default name www.datasheet.co.kr datasheet pdf - http://www..net/
pdf: 09005aef8202ec2e/source: 09005aef8202ebf7 micron technology, inc., reserves the right to change products or specifications without notice. MT9D111__4_rev5.fm - rev. b 2/06 en 63 ?2004 micron technology, inc. all rights reserved. MT9D111 - 1/3.2-inch 2-megapixel soc digital image sensor ifp registers, page 2 micron confidential and proprietary 166 0xa6 15:0 0x1f27 second derivative for zone 6 red color 7:0 d2f/dx2 for zone 6 red color. 15:8 d2f/dy2 for zone 6 red color. second derivative for green color in zone 6. 167 0xa7 15:0 0x1a12 second derivative for zone 6 green color 7:0 d2f/dx2 for zone 6 green color. 15:8 d2f/dy2 for zone 6 green color. second derivative for green color in zone 6. 168 0xa8 15:0 0x1e16 second derivative for zone 6 blue color 7:0 d2f/dx2 for zone 6 blue color. 15:8 d2f/dy2 for zone 6 blue color. second derivative for blue color in zone 6. 169 0xa9 15:0 0x16c7 second derivative for zone 7 red color 7:0 d2f/dx2 for zone 7 red color. 15:8 d2f/dy2 for zone 7 red color. second derivative for red color in zone 7. 170 0xaa 15:0 0x31c5 second derivative for zone 7 green color 7:0 d2f/dx2 for zone 7 green color. 15:8 d2f/dy2 for zone 7 green color. second derivative for green color in zone 7. 171 0xab 15:0 0x2ab6 second derivative for zone 7 blue color 7:0 d2f/dx2 for zone 7 blue color. 15:8 d2f/dy2 for zone 7 blue color. second derivative for blue color in zone 7. 172 0xac 15:0 0x0000 x2 factors 7:0 x2 factors for x zones. if 1 value of th e value of d2f/dx2 is multiplied by 2. 15:8 x2 factors for y zones. if 1 value of th e value of d2f/dy2 is multiplied by 2. 173 0xad 7:0 0x0002 global offset of f(x,y) function signed 8 bit number. value of 32 correspon ds to gain of 1. works as digital gain 174 0xae 15:0 0x018e k factor in k f(x) f(y) this factor can increase lens compensation in the corners to up to 2 times. 192 0xc0 15:0 0 boundaries of first ae measurement window (top/left) 7:0 left window boundary. 15:8 top window boundary. this register specifies top and left boundaries of the first from 16 (left-to p) window used by ae measurement engine. the values programmed in the registers are desired boundaries divided by 8. 193 0xc1 15:0 0x3c50 boundaries of first ae measurement window (height/width) 7:0 window width. 15:8 window height. this register specifies hei ght and width of the first from 16 window us ed by ae measurement engine. the values programmed in the registers are de sired boundaries divided by 2. 194 0xc2 15:0 0x4b00 ae measurement window size (lsw) this register number of pixels in the window used by ae measurement engine. table 7: ifp registers, page 2 (continued) reg # bits default name www.datasheet.co.kr datasheet pdf - http://www..net/
pdf: 09005aef8202ec2e/source: 09005aef8202ebf7 micron technology, inc., reserves the right to change products or specifications without notice. MT9D111__4_rev5.fm - rev. b 2/06 en 64 ?2004 micron technology, inc. all rights reserved. MT9D111 - 1/3.2-inch 2-megapixel soc digital image sensor ifp registers, page 2 micron confidential and proprietary 195 0xc3 2:0 6 ae/af measurement enable 00 ms bit of the ae measurement window size. 11 ae statistic enable. 21 af statistic enable. this register specifies number of pixels in the window used by ae measurement engine. 196 0xc4 15:0 r/o average luminance in ae windows w12 and w11 7:0 average y in w11 (top left). 15:8 average y in w12. 197 0xc5 15:0 r/o average luminance in ae windows w14 and w13 7:0 average y in w13. 15:8 average y in w14 (top right). 198 0xc6 15:0 r/o average luminance in ae windows w22 and w21 7:0 average y in w21. 15:8 average y in w21. 199 0xc7 15:0 r/o average luminance in ae windows w24 and w23 7:0 average y in w23. 15:8 average y in w24. 200 0xc8 15:0 r/o average luminance in ae windows w32 and w31 7:0 average y in w31. 15:8 average y in w32. 201 0xc9 15:0 r/o average luminance in ae windows w34 and w33 7:0 average y in w33. 15:8 average y in w34. 202 0xca 15:0 r/o average luminance in ae windows w42 and w41 7:0 average y in w41 (bottom left). 15:8 average y in w43. 203 0xcb 15:0 r/o average luminance in ae windows w44 and w43 7:0 average y in w43. 15:8 average y in w44 (bottom right). 210 0xd2 9:0 0x0194 saturation and color kill 2:0 4 saturation; 100 = 100%. scal es linearly with value. 5:3 2 color kill gain. determines rate of gain decrease above threshold. if pixel value is above threshold the difference is multip lied by 2^ value-1 (for 0 factor is ?0?) and subtracted from the base gain. 8:6 6 color kill threshold. color kill effects only pixels with value la rger then 128*value. 90 reserved. 211 0xd3 15:0 0 histogram window lower boundaries 7:0 x0/8. 15:8 y0/8. 212 0xd4 15:0 0x95c7 histogram window upper boundaries 7:0 x1/8. 15:8 y1/8. 213 0xd5 10:0 0x030a first set of bin definitions 7:0 offset for bin 0, divided by 4 on 10-bit scale. 10:8 bin width, 0-4lsb,1-8lsb,2-16lsb ,?7-512lsb on a 10-bit scale. table 7: ifp registers, page 2 (continued) reg # bits default name www.datasheet.co.kr datasheet pdf - http://www..net/
pdf: 09005aef8202ec2e/source: 09005aef8202ebf7 micron technology, inc., reserves the right to change products or specifications without notice. MT9D111__4_rev5.fm - rev. b 2/06 en 65 ?2004 micron technology, inc. all rights reserved. MT9D111 - 1/3.2-inch 2-megapixel soc digital image sensor ifp registers, page 2 micron confidential and proprietary 214 0xd6 10:0 0x030a second set of bin definitions 7:0 offset for bin 0, divided by 4 on 10-bit scale. 10:8 bin width, 0-4lsb,1-8lsb,2-16lsb ,?7-512lsb on a 10-bit scale. 215 0xd7 13:0 0x000a histogram window size 12:0 1 number of pixels in the window used by the histogram, set to width*height. 13 0 select a bin set to read. 0 ? bin set 1 1 ? bin set 2 216 0xd8 15:0 0 pixel counts for bin 0 and bin 1 7:0 pixel count for bin 0 (lowest values) divided window size, r215:2. 15:8 pixel count for bin 1 divided by window size, r215:2. histogram module uses luma after interp olation. no color correction or gamm a is applied. digital gains and first black level are applied. this register may not be read out when image portion containing histogram window is being output. there are two bin sets which could be r ead through registers 216 and 217, ba sed on value of bit 13 in reg 215[2]. 217 0xd9 15:0 0x0002 pixel counts for bin 2 and bin 3 7:0 pixel count for bin 2 divided by g factor. 15:8 pixel count for bin 3 (highest values) divided by g factor. 240 0xf0 2:0 2 page register 0 = sensor core 1 = ifp page 1 2 = ifp page 2 241 0xf1 15:0 0 bytewise address special address to perform 16-bit reads and writ es to the sensor in 8-bit chunks. see ?8-bit write sequence? on page 183. table 7: ifp registers, page 2 (continued) reg # bits default name www.datasheet.co.kr datasheet pdf - http://www..net/
pdf: 09005aef8202ec2e/source: 09005aef8202ebf7 micron technology, inc., reserves the right to change products or specifications without notice. MT9D111__5_rev5.fm - rev. b 2/06 en 66 ?2004 micron technology, inc. all rights reserved. MT9D111 - 1/3.2-inch 2-megapixel soc digital image sensor jpeg indirect registers micron confidential and proprietary jpeg indirect registers table 8: jpeg indirect registers (see registers 30 and 31, page 2) reg # bits default name 1 0x01 2:0 0 jpeg core register 1 1:0 0 ncol: number of color components?1. 20 re: when set, enables restart marker insertion into j peg byte stream. 3 0x03 15:0 0 jpeg core register 3 ? nrst re-start interval - 1. valid only when re in core re gister 1 is set. this register defines the number of mcus between restart markers. 4 0x04 7:0 0 jpeg core register 4 00 hd0: dc huffman table poin ter for color component 0. 10 ha0: ac huffman table poin ter for color component 0. 3:2 0 qt0: quantization table pointer for color component 0. 7:4 0 nblock0: number of 8 x 8 blocks?1 for color component 0 in mcu. 5 0x05 7:0 0 jpeg core register 5 00 hd1: dc huffman table poin ter for color component 1. 10 ha1: ac huffman table poin ter for color component 1. 3:2 0 qt1: quantization table pointer for color component 1. 7:4 0 nblock1: number of 8 x 8 blocks?1 for color component 1 in mcu. 6 0x06 7:0 0 jpeg core register 6 00 hd2: dc huffman table poin ter for color component 2. 10 ha2: ac huffman table poin ter for color component 2. 3:2 0 qt2: quantization table pointer for color component 2. 7:4 0 nblock2: number of 8 x 8 blocks?1 for color component 2 in mcu. 7 0x07 7:0 0 jpeg core register 7 00 hd3: dc huffman table poin ter for color component 3. 10 ha3: ac huffman table poin ter for color component 3. 3:2 0 qt3: quantization table pointer for color component 3. 7:4 0 nblock3: number of 8 x 8 blocks?1 for color component 3 in mcu. 8 0x08 15:0 0 jpeg core register8 ? nmcu lsb low-order word of nmcu (nmcu = number of mcus contained in the image to be encoded minus 1). 9 0x09 9:0 0 jpeg core register9 ? nmcu_msb high-order word of nmcu (nmcu = number of mcus contained in the image to be encoded minus 1). 128-511 0x080 - 0x1ff 13:0 0 jpeg quantization memory 0 - 63 ? quantization table 0 64 - 127 ? quantization table 1 128 - 191 ? quantization table 2 192 - 255 ? quantization table 3 256 - 319 ? quantization table 4 320 - 383 ? quantization table 5 512 - 895 0x200 - 0x37f 11:0 0 jpeg huffman memory 0 - 175 ? ac huffman table 0 176 - 351 ? ac huffman table 1 352 - 367 ? dc huffman table 0 368 - 383 ? dc huffman table 1 1024 - 1407 0x400 - 0x43f 13:0 0 jpeg dct memory 64 x 14 dual-port ram is access ible to host and microcontroller indirectly for testing purposes. www.datasheet.co.kr datasheet pdf - http://www..net/
pdf: 09005aef8202ec2e/source: 09005aef8202ebf7 micron technology, inc., reserves the right to change products or specifications without notice. MT9D111__5_rev5.fm - rev. b 2/06 en 67 ?2004 micron technology, inc. all rights reserved. MT9D111 - 1/3.2-inch 2-megapixel soc digital image sensor jpeg indirect registers micron confidential and proprietary 1408 - 1471 0x440 - 0x47f 13:0 0 jpeg zigzag memory 0 64 x 14 dual-port ram is access ible to host and microcontroller indirectly for testing purposes. 1472 - 1535 0x480 - 0x4bf 13:0 0 jpeg zigzag memory 1 64 x 14 dual-port ram is access ible to host and microcontroller indirectly for testing purposes. table 8: jpeg indirect re gisters (see registers 30 and 31, page 2) (continued) reg # bits default name www.datasheet.co.kr datasheet pdf - http://www..net/
pdf: 09005aef8202ec2e/source: 09005aef8202ebf7 micron technology, inc., reserves the right to change products or specifications without notice. MT9D111__5_rev5.fm - rev. b 2/06 en 68 ?2004 micron technology, inc. all rights reserved. MT9D111 - 1/3.2-inch 2-megapixel soc digital image sensor jpeg indirect registers micron confidential and proprietary firmware driver variables table 9: drivers ids id varname description 0 mon monitor 1 seq sequencer 2 ae auto exposure 3 awb auto white balance 4 fd flicker detection 5af auto focus 6 afm auto focus mechanics 7 mode mode 8 reserved 9jpeg j peg 11 hg histogram 12?15 reserved driver extensions 16 monitor extension 17 sequencer extension 18 auto exposure extension 19 auto white balance extension 20 flicker detection extension 21 auto focus extension 22 auto focus mechanics extension 23 mode extension 24 reserved 25 j peg extension 26 histogram extension 27?31 reserved www.datasheet.co.kr datasheet pdf - http://www..net/
pdf: 09005aef8202ec2e/source: 09005aef8202ebf7 micron technology, inc., reserves the right to change products or specifications without notice. MT9D111__5_rev5.fm - rev. b 2/06 en 69 ?2004 micron technology, inc. all rights reserved. MT9D111 - 1/3.2-inch 2-megapixel soc digital image sensor jpeg indirect registers micron confidential and proprietary monitor table 10: driver variables ? monitor driver (id = 0) offs name type default rw description 0 vmt void* 58224 rw reserved 2cmdchar 0rw monitor command setting this variable to 1 causes the monitor to call a firmware function whose address equals mon.arg1. if the function needs an argument, it is given the value of mon.arg2. if the function returns a 1- or 2-byte value, it is put in mon.arg2. setting mon.cmd to 2 causes the monitor to calculate crc for a memory block defined by a starting address in mon.arg1 and length in mon.arg2. the crc is returned in mon.arg2. the monitor starts ex ecuting each received command at the earliest opportunity. before starting , it sets bit 7 of mon.cmd to 1. the bit remains set un til the command exec ution is finished. usage: set mon.arg1 and mon.arg2 and write command number to mon.cmd. wait until mon.cmd=0. re trieve numerical result, if any, from mon.arg2. 3arg1uint 0rw first argument for monitor command 5arg2uint 0rw second argument for monitor command 7 msgcount char 0 r number of posted messages usage: poll this variable to detect me ssages. when mon. msgcount > 0, read mon.msg. tb d?clear counter. 8 msg long 0 r first message (unused) 12 ver uchar 32 r bits [6:0] = firmware version bit 7 = reserved www.datasheet.co.kr datasheet pdf - http://www..net/
pdf: 09005aef8202ec2e/source: 09005aef8202ebf7 micron technology, inc., reserves the right to change products or specifications without notice. MT9D111__5_rev5.fm - rev. b 2/06 en 70 ?2004 micron technology, inc. all rights reserved. MT9D111 - 1/3.2-inch 2-megapixel soc digital image sensor jpeg indirect registers micron confidential and proprietary sequencer table 11: driver variables ? sequencer driver (id = 1) offs name type default rw description 0 vmt void* 61547 rw reserved 2 mode uchar 0x0f rw set of 1-bit switches enabling various drivers and outdoor white balance option. writing 1 to a particular switch enables the corresponding driver or option. bit 0 ? auto exposure driver (id = 2) bit 1 ? flicker detection driver (id = 4) bit 2 ? auto white balance driver (id = 3) bit 3 ? histogram driver (id = 11) bit 4 ? auto focus driver (id = 5) bit 5 ? option to force outdoor white balance settings if exposure value exceed s sharedparams.outdoorth threshold. bits 6:7 ? new af scheme that improves performance with noise dominated windows. bit 7 ? tbd 3 cmd uchar 0 rw command or program to execute 0 ? run 1 ? do preview 2 ? do capture 3 ? do standby 4 ? do lock 5 ? refresh 6 ? refresh mode writing a positive value to this variable commands the sequencer to execute the corresponding program. the sequencer resets cmd to 0, executes the program, and then resumes running in its current state. 4 state uchar 3 r current state of sequencer 0 ? initialize 1 ? mode change to preview 2 ? enter preview 3 ? preview 4 ? leave preview 5 ? mode change to capture 6 ? enter capture 7 ? capture 8 ? leave capture 9 ? standby 5 stepmode uchar 0 rw step-by-step mode for sequencer bit 0 ? step mode on/off (1 = on) bit 1 ? 1 forces the sequencer to do next step 6 sharedparams.flashtype uchar 0 rw type of flash to be used 0 ? none 1 ? led 2 ? xenon 3 ? xenon burst bit 7 ? 1if flash was on in lock mode www.datasheet.co.kr datasheet pdf - http://www..net/
pdf: 09005aef8202ec2e/source: 09005aef8202ebf7 micron technology, inc., reserves the right to change products or specifications without notice. MT9D111__5_rev5.fm - rev. b 2/06 en 71 ?2004 micron technology, inc. all rights reserved. MT9D111 - 1/3.2-inch 2-megapixel soc digital image sensor jpeg indirect registers micron confidential and proprietary 7 sharedparams.aecontbuff uchar 8 rw weighting factor determini ng to what extent ae driver averages luma over time in continuous ae mode. setting of 32 disables luma averaging?only current luma values are used . lower settings enable luma averaging. 8 sharedparams.aecontstep uchar 2 rw number of steps in which ae driver is expected to reach target brightness in continuous ae mode. 9 sharedparams.ae fastbuff uchar 32 rw weighting factor determini ng to what extent ae driver averages luma over ti me in fast mode. setting of 32 disables luma averaging? only current luma values are used. lower settings enable luma averaging. 10 sharedparams.aefaststep uchar 1 rw number of steps in which ae driver is expected to reach target brightness in fast ae mode. 11 sharedparams.awbcontbuff uchar 8 rw weighting factor determini ng to what extent awb driver averages luma over time in continuous awb mode. setting of 32 disables luma averaging?only current luma values are used . lower settings enable luma averaging. 12 sharedparams.awbcontstep uchar 2 rw number of steps in which awb driver is expected to reach target color balance in continuous awb mode. 13 sharedparams.awbfastbuff uchar 32 rw weighting factor determini ng to what extent awb driver averages luma over ti me in fast mode. setting of 32 disables luma averaging? only current luma values are used. lower settings enable luma averaging. 14 sharedparams.awbfaststep uchar 1 rw number of steps in which awb driver is expected to reach target color balance in fast awb mode. 18 sharedparams.totalmaxframes uchar 30 rw number of frames after which every driver must time out. 19 sharedparams.flashth uchar 0 rw exposure value (ev) threshol d. if current ev is below this threshold, flash is us ed in autoevaluate flash mode. 20 sharedparams.outdoorth uchar 10 rw exposure value (ev) threshol d. if current ev is above this threshold and bit 5 of seq.mode equals 1, awb driver is forced to choose color correction settings suitable for daylight color temperature of 6500 k. 21 sharedparams.llmode uchar 0x60 rw bit 0 ? change interpolation threshold bit 1 ? reduce color saturation bit 2 ? reduce aperture correction bit 3 ? increase aperture co rrection threshold bit 4 ? enable y filter 22 sharedparams.llvirt gain1 uchar 0x51 rw min. ll virtual gain. de fined as (ae.virtgain/2 + ae.dgainae1/16 + ae.dgainae2/4). 23 sharedparams.llvirt gain2 uchar 0x5a rw max. ll virtual gain. min. and max. ll virtual gains define when low-light parameters start and stop changing. 24 sharedparams.llsat1 uchar 128 rw max. color saturation for colo r correction matrix (128 means 100%). 25 sharedparams.llsat2 uchar 0 rw min. color saturation 26 sharedparams.llinterpthresh1 uchar 16 rw min. threshold fo r interpolation 27 sharedparams.llinterpthresh2 uchar 64 rw max. threshold for interpolation table 11: driver variables ? sequencer driver (id = 1) (continued) offs name type default rw description www.datasheet.co.kr datasheet pdf - http://www..net/
pdf: 09005aef8202ec2e/source: 09005aef8202ebf7 micron technology, inc., reserves the right to change products or specifications without notice. MT9D111__5_rev5.fm - rev. b 2/06 en 72 ?2004 micron technology, inc. all rights reserved. MT9D111 - 1/3.2-inch 2-megapixel soc digital image sensor jpeg indirect registers micron confidential and proprietary 28 sharedparams.llapcorr1 uchar 2 rw max. aperture correction 29 sharedparams.llapcorr2 uchar 0 rw min. aperture correction 30 sharedparams.llapthresh1 uchar 8 rw min. aperture correction threshold 31 sharedparams.llapthresh2 uchar 64 rw max. aperture correction threshold 32 captureparams.mode uchar 0x00 rw capture mode bit 0 ? capture with xenon flash (still only) bit 1 ? capture video bit 2 ? reserved bit 3 ? af on (video only) bit 4 ? ae on (video only) bit 5 ? awb on (video only) bit 6 ? hg on (video only) 33 captureparams.numframes uchar 3 rw number of frames captured in still capture mode 34 previewparams[0].ae uchar 1 rw auto exposure configuratio n in previewenter state 0 ? off 1 ? fast settling 2 ? manual 3 ? continuous 4 ? fast settling + metering 35 previewparams[0].fd uchar 0 rw flicker detection configurat ion in previewenter state 0 ? off 1 ? manual 2 ? continuous 36 previewparams[0].awb uchar 1 rw auto white balance configuration in previewenter state 0 ? off 1 ? fast settling 2 ? manual 3 ? continuous 37 previewparams[0].af uchar 0 rw auto focus configuration in previeweenter state 0 ? off 1 ? fast 2 ? manual 5 ? creep compensation 38 previewparams[0].hg uchar 1 rw histogram configuration in previewenter state 0 ? off 1 ? fast 2 ? manual 3 ? continuous 39 previewparams[0].flash uchar 0 rw flash configuration in previewenter state 0 ? off 1 ? on 2 ? locked 3 ? autoevaluate bit 7 ? load user defined settings 40 previewparams[0].skipframe uchar 0x00 rw bit 7 ? 1means turn off fen bit 6 ? 1means skip state bit 5 ? 1means skip first frame when led on table 11: driver variables ? sequencer driver (id = 1) (continued) offs name type default rw description www.datasheet.co.kr datasheet pdf - http://www..net/
pdf: 09005aef8202ec2e/source: 09005aef8202ebf7 micron technology, inc., reserves the right to change products or specifications without notice. MT9D111__5_rev5.fm - rev. b 2/06 en 73 ?2004 micron technology, inc. all rights reserved. MT9D111 - 1/3.2-inch 2-megapixel soc digital image sensor jpeg indirect registers micron confidential and proprietary 41 previewparams[1].ae uchar 3 rw auto exposure configuration in preview state 0 ? off 1 ? fast settling 2 ? manual 3 ? continuous 4 ? fast settling + metering 42 previewparams[1].fd uchar 2 rw flicker detection configuration in preview state 0 ? off 1 ? manual 2 ? continuous 43 previewparams[1].awb uchar 3 rw auto white balance configuration in preview state 0 ? off 1 ? fast settling 2 ? manual 3 ? continuous 44 previewparams[1].af uchar 0 rw auto focus configuration in preview state 0 ? off 1 ? fast 2 ? manual 5 ? creep compensation 45 previewparams[1].hg uchar 3 rw histogram configuration in preview state 0 ? off 1 ? fast 2 ? manual 3 ? continuous 46 previewparams[1].flash uchar 0 rw flash configuration in preview state 0 ? off 1 ? on 2 ? locked 3 ? autoevaluate bit 7 ? load user defined settings 47 previewparams[1].skipframe uchar 0x00 rw bit 7 ? 1means turn off fen bit 6 ? 1means skip state bit 5 ? 1means skip first frame when led on 48 previewparams[2].ae uchar 4 rw auto exposure configuration in previewleave state 0 ? off 1 ? fast settling 2 ? manual 3 ? continuous 4 ? fast settling + metering 49 previewparams[2].fd uchar 0 rw flicker detection configurat ion in previewleave state 0 ? off 1 ? manual 2 ? continuous 50 previewparams[2].awb uchar 1 rw auto white balance configuration in previewleave state 0 ? off 1 ? fast settling 2 ? manual 3 ? continuous table 11: driver variables ? sequencer driver (id = 1) (continued) offs name type default rw description www.datasheet.co.kr datasheet pdf - http://www..net/
pdf: 09005aef8202ec2e/source: 09005aef8202ebf7 micron technology, inc., reserves the right to change products or specifications without notice. MT9D111__5_rev5.fm - rev. b 2/06 en 74 ?2004 micron technology, inc. all rights reserved. MT9D111 - 1/3.2-inch 2-megapixel soc digital image sensor jpeg indirect registers micron confidential and proprietary 51 previewparams[2].af uchar 0 rw auto focus configuration in previewleave state 0 ? off 1 ? fast 2 ? manual 5 ? creep compensation 52 previewparams[2].hg uchar 1 rw histogram configuration in previewleave state 0 ? off 1 ? fast 2 ? manual 3 ? continuous 53 previewparams[2].flash uchar 0 rw flash configuration in previewleave state 0 ? off 1 ? on 2 ? locked 3 ? autoevaluate bit 7 ? load user defined settings. 54 previewparams[2].skipframe uchar 0x00 rw bit 7 ? 1means turn off fen bit 6 ? 1means skip state bit 5 ? 1means skip first frame when led on 55 previewparams[3].ae uchar 0 rw auto exposure configurat ion in captureenter state 0 ? off 1 ? fast settling 2 ? manual 3 ? continuous 4 ? fast settling + metering 56 previewparams[3].fd uchar 0 rw flicker detection configuration in captureenter state 0 ? off 1 ? manual 2 ? continuous 57 previewparams[3].awb uchar 0 rw auto white balance configuration in captureenter state 0 ? off 1 ? fast settling 2 ? manual 3 ? continuous 58 previewparams[3].af uchar 0 rw auto focus configuration in captureenter state 0 ? off 1 ? fast 2 ? manual 5 ? creep compensation 59 previewparams[3].hg uchar 0 rw histogram configuration in captureenter state 0 ? off 1 ? fast 2 ? manual 3 ? continuous 60 previewparams[3].flash uchar 0 rw flash configuration in captureenter state 0 ? off 1 ? on 2 ? locked 3 ? autoevaluate bit 7 ? load user defined settings table 11: driver variables ? sequencer driver (id = 1) (continued) offs name type default rw description www.datasheet.co.kr datasheet pdf - http://www..net/
pdf: 09005aef8202ec2e/source: 09005aef8202ebf7 micron technology, inc., reserves the right to change products or specifications without notice. MT9D111__5_rev5.fm - rev. b 2/06 en 75 ?2004 micron technology, inc. all rights reserved. MT9D111 - 1/3.2-inch 2-megapixel soc digital image sensor jpeg indirect registers micron confidential and proprietary auto exposure 61 previewparams[3].skipframe uchar 0x00 rw bit 7 ? 1means turn off fen bit 6 ? 1means skip state bit 5 ? 1means skip first frame when led on table 12: driver variables ? auto exposure d river (id = 2) offs name type default rw description 0 vmt void* 59518 rw reserved 2 windowpos uchar 0 rw position of upper left corner of first ae window bits [3:0] ? x0 in units of 1/16th of frame width bits [7:4] ? y0 in units 1/16th of frame height new position written to this variable takes effect only after refresh_mode command is given to the sequencer (seq.cmd is set to 6). 3 windowsize uchar 0xef rw dimensions of 4 x 4 array of ae windows bits [3:0] ? width (in units of 1/16th of frame width) decremented by 1 bits [7:4] ? height (in units of 1/16th of frame height) decremented by 1 new dimensions written to this variable take effect only after refresh_mode command is given to the sequencer (seq.cmd is set to 6). 4 wakeupline uint r number of image row at which mcu wakes up to do ae calculations. this number is automatically adjusted after each change of the position and dimensions of the ae windows. 6 target uchar 60 rw target brightness 7 gate uchar 10 rw ae sensitivity 8skipframesuchar0rw frequency of ae updates 9 j umpdivisor uchar 2 rw factor reducing exposure jumps (1 = fastest jumps) 10 lumabufferspeed uchar 8 rw speed of buffering (32 = fastest, 1= slowest) 11 maxr12 uint 1200 rw maximum value of r 12:0 (shutter delay) 13 minindex uchar 0 rw minimum allowed zone number (i.e. minimum integration time) 14 maxindex uchar 24 rw maximum allowed zone number (i.e. maximum integration time) 15 minvirtgain uchar 16 rw minimum allowed virtual gain 16 maxvirtgain uchar 128 rw maximum allowed virtual gain 17 maxadchi uchar 13 rw maximum adc vref_hi setting 18 minadchi uchar 11 rw minimum adc vref_hi setting 19 minadclo uchar 7 rw minimum adc vref_lo setting 20 maxdgainae1 uint 128 rw maximum digital gain pre-lc 22 maxdgainae2 uchar 32 rw maximum digital gain post-lc 23 indexth23 uchar 8 rw zone number to start gain increase in low-light. sets frame rate at normal illumination. 24 maxgain23 uchar 120 rw maximum gain to increase in low-light before dropping frame rate. sets frame rate at low-light. table 11: driver variables ? sequencer driver (id = 1) (continued) offs name type default rw description www.datasheet.co.kr datasheet pdf - http://www..net/
pdf: 09005aef8202ec2e/source: 09005aef8202ebf7 micron technology, inc., reserves the right to change products or specifications without notice. MT9D111__5_rev5.fm - rev. b 2/06 en 76 ?2004 micron technology, inc. all rights reserved. MT9D111 - 1/3.2-inch 2-megapixel soc digital image sensor jpeg indirect registers micron confidential and proprietary 25 weights uchar 0xff rw bits [7:4] ? background weight bits [3:0] ? center zone weight 26 status uchar 192 rw ae status bit 0 ? 1 if ae reached the limit bit 1 ? 1 if r9 is changed (need to skip frame) bit 2 ? ready bit 3 ? do mettering mode bit 4 ? mettering mode is done bit 6 ? on/off overexpose fit bit 7 ?o n/off overexpose compensation 27 currenty uchar r last measured luminance 28 r12 uint rw current shutter delay value 30 index uchar r current zone (integration time) 31 virtgain uchar rw current virtual gain 32 adc_hi uchar r current adc v ref _ hi value 33 adc_lo uchar r current adc v ref _ lo value 34 dgainae1 uint rw current digital gain pre-lc 36 dgainae2 uchar rw current digital gain post-lc 37 r9 uint rw current r9:0 value (integration time) 39 r65 uchar rw current adc v ref values 40 rowtime uint 531 rw row time divided by 4 (in master clock periods) 42 gainr12 uchar 128 r gain compensating too low maxr12 (128 = unit gain) 43 skipframes_cnt uchar r counter of skipped frames 44 bufferedluma uint r current time-buffered measured luma 46 dirae_prev uchar r previous state of ae 47 r9_step uint 157 rw integration time of one zone 50 maxadclo uchar r maximum adc vref_lo setting 51 physgainr uint r physical (analog) r gain 53 physgaing uint r physical (analog) g gain 55 physgainb uint r physical (analog) b gain 82 mmevzone1 uchar 16 rw ev threshold for scen es containing the sun 83 mmevzone2 uchar 12 rw ev threshold for br ight outdoor scenes 84 mmevzone3 uchar 8 rw ev threshold for indoor or outdoor twilight scenes 85 mmevzone4 uchar 2 rw ev threshold for night scenes 86 mmshiftev uchar 13 rw exposure value shif t. adjust this va lue for given lens. 87 numoe uchar r number of overexposed zones table 12: driver variables ? auto exposure driver (id = 2) (continued) offs name type default rw description www.datasheet.co.kr datasheet pdf - http://www..net/
pdf: 09005aef8202ec2e/source: 09005aef8202ebf7 micron technology, inc., reserves the right to change products or specifications without notice. MT9D111__5_rev5.fm - rev. b 2/06 en 77 ?2004 micron technology, inc. all rights reserved. MT9D111 - 1/3.2-inch 2-megapixel soc digital image sensor jpeg indirect registers micron confidential and proprietary auto white balance table 13: driver variables ? auto white balance (id = 3) offs name type default rw description 0vmtvoid* 59731 rw reserved 2 windowpos uchar 0 rw position of upper left corner of awb window bits [3:0] ? x0 in units of 1/16th of frame width bits [7:4] ? y0 in units 1/16th of frame height new position written to this va riable takes effect only after refresh_mode command is given to the sequencer (seq.cmd is set to 6). 3 windowsize uchar 0xef rw dimensions of awb window bits [3:0] ? width (in units of 1/16th of frame width) decremented by 1. bits [7:4] ? height (in units of 1/ 16th of frame height) decremented by 1. new dimensions written to this variable take effect only after refresh_mode command is given to the sequencer (seq.cmd is set to 6). 4 wakeupline uint r number of image row at which mcu wakes up to perform awb calculations. this number is automatically adjusted after each change of the position and dimensions of the awb window. 6 ccml[0] int 0x0219 rw left color correction matrix element k11. value is encoded in signed two?s complement form; 256 means 1.0. new values written to awb.ccml array ta ke effect only after refresh command is given to the sequencer (seq.cmd is set to 5). 8 ccml[1] int 0xfeec rw left color correct ion matrix element k12 10 ccml[2] int 0xffff rw left color correction matrix element k13 12 ccml[3] int 0xff6a rw left colo r correction matr ix element k21 14 ccml[4] int 0x01d4 rw left color correct ion matrix element k22 16 ccml[5] int 0xffc9 rw left color correct ion matrix element k23 18 ccml[6] int 0xff71 rw left color correct ion matrix element k31 20 ccml[7] int 0xfdd3 rw left color correct ion matrix element k32 22 ccml[8] int 0x03ed rw left color correct ion matrix element k33 24 ccml[9] int 0x0020 rw left color correction ma trix red/green gain ratio. value is interpreted as unsigned; 32 means 1.0. 26 ccml[10] int 0x0035 rw left color correction ma trix blue/green gain ratio. value is interpreted as unsigned; 32 means 1.0. 28 ccmrl[0] int 0xff92 rw delta color correction matrix element d11. value is encoded in signed two?s complement form; 256 means 1.0. new values written to awb.ccmrl array take effect only after refresh command is given to the sequencer (seq.cmd is set to 5). 30 ccmrl[1] int 0x0098 rw delta color correct ion matrix element d12 32 ccmrl[2] int 0xffe1 rw delta color correct ion matrix element d13 34 ccmrl[3] int 0x0014 rw delta color correctio n matrix element d21 36 ccmrl[4] int 0xfffc rw delta color correctio n matrix element d22 38 ccmrl[5] int 0xfff2 rw delta color correctio n matrix element d23 40 ccmrl[6] int 0x004e rw delta color correctio n matrix element d31 42 ccmrl[7] int 0x0148 rw delta color correctio n matrix element d32 44 ccmrl[8] int 0xfe3f rw delta color correctio n matrix element d33 www.datasheet.co.kr datasheet pdf - http://www..net/
pdf: 09005aef8202ec2e/source: 09005aef8202ebf7 micron technology, inc., reserves the right to change products or specifications without notice. MT9D111__5_rev5.fm - rev. b 2/06 en 78 ?2004 micron technology, inc. all rights reserved. MT9D111 - 1/3.2-inch 2-megapixel soc digital image sensor jpeg indirect registers micron confidential and proprietary 46 ccmrl[9] int 0x000a rw delta color correction matrix red/green gain ratio. value is interpreted as unsigned; 32 means 1.0. 48 ccmrl[10] int 0xfff1 rw delta color correction matrix blue/green gain ratio. value is interpreted as unsigned; 32 means 1.0. 50 ccm[0] int rw current color correctio n matrix element c11. value is stored in signed two?s complement form; 256 means 1.0. 52 ccm[1] int rw current color correctio n matrix element c12 54 ccm[2] int rw current color correctio n matrix element c13 56 ccm[3] int rw current color correctio n matrix element c21 58 ccm[4] int rw current color correctio n matrix element c22 60 ccm[5] int rw current color correctio n matrix element c23 62 ccm[6] int rw current color correctio n matrix element c31 64 ccm[7] int rw current color correctio n matrix element c32 66 ccm[8] int rw current color correctio n matrix element c33 68 ccm[9] int rw current color correction ma trix red/green gain ratio. value is interpreted as unsigned; 32 means 1.0. 70 ccm[10] int rw current color correction matr ix blue/green gain ratio. value is interpreted as unsigned; 32 means 1.0. 72 gainbufferspeed uchar 8 rw speed of time-buffering (32 = fastest, 1= slowest) 73 j umpdivisor uchar 2 rw derating factor for white bala nce changes (1= fastest changes) 74 gainmin uchar 83 rw minimum allowed awb digital gain (128 means 1.0) 75 gainmax uchar 192 rw maximum allowed awb digital gain (128 means 1.0) 76 gainr uchar r current r digital gain (128 means1.0) 77 gaing uchar r current g digital gain (128 means1.0) 78 gainb uchar r current b digital gain (128 means 1.0) 79 ccmpositionmin uchar 0 rw leftmost position of color correc tion matrix (corresponding to incandescent light) 80 ccmpositionmax uchar 127 rw rightmost position of color correction matrix (corresponding to daylight) 81 ccmposition uchar 64 rw current position of color correction matr ix (0 corresponds to incandescent light, 127 to daylight) 82 saturation uchar 128 rw saturation of color correction matrix (128 means 100%) 83 mode uchar 0 rw bit 0 ? 1 = awb is in steady state bit 1 ? 1 = limits are reached bit 2 ? 1 = reserved bit 3 ? 1 = debug bit 4 ? 1 = no awb statistic bit 5 ? 1 = force awb dgains to un it; program value into awb.ccmposition to manual ly set matrix position bit 6 ? 1 = disable ccm normalization bit 7 ? 1 = force outdoor settings, set by the sequencer 84 gainr_buf uint 0x1000 rw time-buffered r gain (0x1000 means 1.0) 86 gainb_buf uint 0x1000 rw time-buffered b gain (0x1000 means 1.0) 88 sumr uchar r awb statistics (normalized to an arbitrary number) 89 sumy uchar r awb statistics (normalized to an arbitrary number) 90 sumb uchar r awb statistics (normalized to an arbitrary number) table 13: driver variables ? auto white balance (i d = 3) (continued) offs name type default rw description www.datasheet.co.kr datasheet pdf - http://www..net/
pdf: 09005aef8202ec2e/source: 09005aef8202ebf7 micron technology, inc., reserves the right to change products or specifications without notice. MT9D111__5_rev5.fm - rev. b 2/06 en 79 ?2004 micron technology, inc. all rights reserved. MT9D111 - 1/3.2-inch 2-megapixel soc digital image sensor jpeg indirect registers micron confidential and proprietary 91 steadybgainoutmin uchar 115 rw blue gain min. threshold to sta rt search. when the blue gain falls below this threshold, the awb driver starts searching for new color correction matrix position . threshold setting of 128 corresponds to gain of 1.0; higher setting means higher gain. 92 steadybgainoutmax uchar 140 rw blue gain max. threshold to start search. when the blue gain goes above this threshold, the awb driver starts searching for new color correction ma trix position. thresh old setting of 128 corresponds to gain of 1.0; higher setting means higher gain. 93 steadybgaininmin uchar 124 rw blue gain min. threshold to end search. when the blue gain is between awb.steadybgaininmin and awb.steadybgaininmax, the awb driver maintains curr ent color corre ction matrix position. threshold setting of 12 8 corresponds to gain of 1.0; higher setting means higher gain. 94 steadybgaininmax uchar 131 rw blue gain max. threshold to end search. see awb.steadybgaininmin above. 95 cntpxlth uint 100 rw reserved 97 tg_min0 uchar 226 rw reserved 98 tg_max0 uchar 246 rw reserved 99 xo 16 rw ccm position threshold be tween day and incandescent normalization coefficients. 100 kr_l uchar 170 rw ccm red row normalization coef ficient for left matrix position (128 - minimal number) 101 kg_l uchar 150 rw ccm green row normalization coef ficient for left matrix position (128 - minimal number) 102 kb_l uchar 128 rw ccm blue row normalization coef ficient for left ma trix position (128 - minimal number) 103 kr_r uchar 128 rw ccm red row normalization coeffi cient for right ma trix position (128 - minimal number) 104 kg_r uchar 128 rw ccm green row normalizatio n coefficient for right matrix position (128 - minimal number) 105 kb_r uchar 128 rw ccm blue row normalization coef ficient for right matrix position (128 - minimal number) table 13: driver variables ? auto white balance (i d = 3) (continued) offs name type default rw description www.datasheet.co.kr datasheet pdf - http://www..net/
pdf: 09005aef8202ec2e/source: 09005aef8202ebf7 micron technology, inc., reserves the right to change products or specifications without notice. MT9D111__5_rev5.fm - rev. b 2/06 en 80 ?2004 micron technology, inc. all rights reserved. MT9D111 - 1/3.2-inch 2-megapixel soc digital image sensor jpeg indirect registers micron confidential and proprietary flicker detection table 14: driver variables ? flicker detection driver (id = 4) offs name type default rw description 0vmtvoid* 59884 rw reserved 2 windowposh uchar 29 rw width of flicker measurement window and position of its left boundary x0 bits [3:0] ? width (in units of 1/16th of frame width) decremented by 1 bits [7:4] ? x0 (in the same units as the width) at the beginning of each fl icker measurement, the top boundary (y0) of the flicker measurement window is set at row 64. average luminance in the window is measured by the ifp measurement engine and stored in fd.buffer[0]. then y0 is incremented by fd.windowheight and the buffer index by 1. by repeating these steps 47 times, the entire fd.buffer is filled wi th average luminance values from a vertical array of 48 equal-size windows. 3 windowheight uchar 4 rw bits [5:0] ? flicker measurement window height in rows 4modeuchar0 rw mode switches and indicators bit 7 ? 1 enables manual mode, 0 disables it bit 6 ? 0 selects 60hz settings for manual mode, 1 selects 50hz settings bit 5 ? read-only, indicates curr ent settings (0?60hz, 1?50hz) bit 4 ? 1 enables debug mode, 0 disables it bits [3:0] ? read-only, reserved for auto fd 5 wakeupline uint 64 r number of image row at which mcu wakes up to perform flicker detection. changing the value of fd.wakeupline has no effect on the functioning of the fd driver, because it does not use this variable. it simply sets it to 64 at initialization, to indicate the top of the flicker measurement area. see fd.windowposh above. 7smooth_cntuchar 5 rw reserved 8 search_f1_50 uchar 30 rw lower limit of period rang e of interest in 50hz flicker detection. if the fd driver is searching for 50hz flicker and detects in a frame a flicker-like signal whose period in rows is between fl.search_f 1_50 and fl.search_f2_50, it counts the frame as one containing flicker. 9 search_f2_50 uchar 32 rw upper limit of period rang e of interest in 50hz flicker detection. see fd.search_f1_50 above. 10 search_f1_60 uchar 37 rw lower limit of period rang e of interest in 60hz flicker detection. if the fd driver is searching for 60hz flicker and detects in a frame a flicker-like signal whose period in rows is between fl.search_f 1_60 and fl.search_f2_60, it counts the frame as one containing flicker. 11 search_f2_60 uchar 39 rw upper limit of period rang e of interest in 60hz flicker detection. see fd.search_f1_60 above. 12 skipframe uchar 0 rw skip frame before subtracting two frames. 13 stat_min uchar 3 rw flicker is considered dete cted if fd.stat_min out of fd.stat_max consecutive frames contain flicker (periodic signal of sought frequency). 14 stat_max uchar 5 rw see fl.stat_min. www.datasheet.co.kr datasheet pdf - http://www..net/
pdf: 09005aef8202ec2e/source: 09005aef8202ebf7 micron technology, inc., reserves the right to change products or specifications without notice. MT9D111__5_rev5.fm - rev. b 2/06 en 81 ?2004 micron technology, inc. all rights reserved. MT9D111 - 1/3.2-inch 2-megapixel soc digital image sensor jpeg indirect registers micron confidential and proprietary 15 stat uchar r reserved 16 minamplitude uchar 5 rw reserved 17 r9_step60 uint 157 rw minimal shutter width step for 60hz ac 19 r9_step50 uint 188 rw minimal shutter width step for 50hz ac 21 buffer[48] uchar[48] r reserved table 14: driver variables ? flicker detection driver (id = 4) (continued) offs name type default rw description www.datasheet.co.kr datasheet pdf - http://www..net/
pdf: 09005aef8202ec2e/source: 09005aef8202ebf7 micron technology, inc., reserves the right to change products or specifications without notice. MT9D111__5_rev5.fm - rev. b 2/06 en 82 ?2004 micron technology, inc. all rights reserved. MT9D111 - 1/3.2-inch 2-megapixel soc digital image sensor jpeg indirect registers micron confidential and proprietary auto focus table 15: driver variables- auto focus driver (id = 5) off name type default rw description 0 vmt void* 0xe9d2 rw pointer to virtual method table (vmt) 2 windowpos uchar 0x44 rw position of the upper left corner of the first af window (w11): bits [3:0] ? x coordinate (horizontal offset from the upper left corner of the frame) in units of 1/16th of frame width, bits [7:4] ? y coordinate (vertical offset from the upper left corner of the frame) in units of 1/16th of frame height. new position written to this variable takes effect after refresh_mode command is given to sequencer driver (sq.cmd is set to 6). 3 windowsize uchar 0x77 rw dimensions of the 4 x 4 array of af windows: bits [3:0] ? width (in units of 1/16th of frame width) decremented by 1, bits [7:4] ? height (in units of 1/16th of frame height) decremented by 1. new dimensions written to this variable take effect only after refresh_mode command is given to the sequencer (sq.cmd is set to 6). 4modeuchar0 rw two mode switches and 5 bits reserved for use in default snapshot af mode: bit 7 ? manual mode switch (0 ? manual mode disabled, 1 ? enabled), bit 6 ? creep compensation mode swit ch (0 - creep compensation mode disabled, 1 ? enabled), bits [4:0] ? reserved for use in snapshot af mode. if af is enabled in the sequencer (sq.mode bit 4 = 1) and manual mode is disabled (af.mode bit 7 = 0), a snapshot af sequence can be triggered at any time by sett ing af.mode bit 0 to 1. bits [4:0] are used in the sequence and automatically cleared at its end. 5 modeex uchar 128 rw four option switches and 4 status indicators: bit 7 ? switch enabling the second flyback (jump to the start position of the first scan) and th en jump to best focus position, bit 6 ? switch enabling the second fl yback and retracing of scan steps to best fo cus position (0 ? option disabled, 1 ? enabled), bit 5 ? switch enabling the second scan (0 ? disabled, 1 ? enabled), bit 4 ? error flag to indicate that af has failed due to insufficient variability of sharpness scores with lens positions (see af.shath). bit 3 ? if bit 7 of af.mode equals 0, this bit enables skipping 1 extra frame after detecting that bit 1 of afm.status has been cleared (i.e. after the end of every lens movement), bit 2 ? status indicator, set to 1 wh en the extra frame is being skipped, bit 1 ? status indicator, set to 1 wh en the second scan is in progress, bit 0 ? status indicator, set to 1 wh en sharpness scores are ready. 6 numsteps uchar 10 rw number of steps (l ens positions tried) in th e first scan. www.datasheet.co.kr datasheet pdf - http://www..net/
pdf: 09005aef8202ec2e/source: 09005aef8202ebf7 micron technology, inc., reserves the right to change products or specifications without notice. MT9D111__5_rev5.fm - rev. b 2/06 en 83 ?2004 micron technology, inc. all rights reserved. MT9D111 - 1/3.2-inch 2-megapixel soc digital image sensor jpeg indirect registers micron confidential and proprietary 7 initpos uchar 0 rw number (index) of start position, af.positions[af.in itpos], used in the first scan and optional seco nd scan. must be 0 at the beginning of the first scan if the second is enabled. otherwise, can be set before the first scan to any value below 20- af.numsteps. the af driver make s af.initpos equal to af.numsteps at the beginning of the second sc an and equal to 0 at the end of last scan (first or second, whichever is last). 8 numsteps2 uchar 6 rw bits [3:0] ? desired number of steps in second scan (max. allowed number is 14) bits [7:4] ? actual number of steps in the second scan (calculated by the af driver at the beginning of the scan). 9 stepsize uchar 6 rw logical step size for th e second scan. because the logical range of motion is from 0 to 255, af. stepsize=6 means th at during the second scan the af driver tries to move the lens in increments equal to 6/255 of the length of i ts entire motion range. however, the lens actuator may or may not be able to move the lens in steps of precisely that size. it is important to ascertain that lens movements requested by the af dr iver during the second scan can be at least reasonably approx imated by the lens actuator. the quality of the approximation may depend on how well the physical limitations of the actu ator are accounted for in the source code and /or configuration of the afm driver. 10 wakeupline uint 448 rw number of image row at which th e mcu wakes up to execute af driver code. when th e function af_setsize resizes the 4 x 4 array of af windows according to new values of af.windowpos and af.windowsize, it automaticall y makes af.wakeupline equal to the number of the second row be low the bottom of the array. if af.windowpos and af.windowsize ar e such that the bottom of the array is outside the frame, the value given to af.wakeupline by af_setsize is greater than frame he ight, i.e. invalid. it must be changed to something less than the frame height, otherwise af does not work. 12 zoneweights ulong 0xffffff ff rw weights of the af windows or zone s. bits [1:0] of this variable represent the weight of window w11, bits [3:2] the weight of w12, and so on to bits [31:30] th at represent the weight of w44. since each weight is represented by just 2 bits, it is allowed to have only 4 values, 0, 1/3, 2/3 or 1. value stored in each 2 bits equals window weight times 3, so the value of 1 signifies the weight of 1/3, 2 stands for 2/3, and 3 for 1. 16 distanceweig ht uint 0xff rw reserved. table 15: driver variables-auto fo cus driver (id = 5) (continued) off name type default rw description www.datasheet.co.kr datasheet pdf - http://www..net/
pdf: 09005aef8202ec2e/source: 09005aef8202ebf7 micron technology, inc., reserves the right to change products or specifications without notice. MT9D111__5_rev5.fm - rev. b 2/06 en 84 ?2004 micron technology, inc. all rights reserved. MT9D111 - 1/3.2-inch 2-megapixel soc digital image sensor jpeg indirect registers micron confidential and proprietary 17 bestposition uchar 0 rw this variable is used in 3 different ways depending on values of bits 6 and 7 of af.mode. when bit 7 equals 1 (in manual lens control mode), the position of af lens can be changed by changing the value of af.bestposition, which is interpre ted by the af driver as logical lens position desired by its user. the af driver reads af.bestposition once every frame, and if it differs from current logical lens position (afm.curpos ), the af driver gives the afm driver a command to make these variables equal by moving the lens. physical movement of the le ns corresponding to the change of afm.curpos to af.bestposition always takes some time, during which it is best not to change the value of af.bestposition to avoid possible errors. when af.mode bits [7:6] are both 0, af.bestposition serves to store af algorithm output ra ther than user input. after both first and second scan, th e af algorithm ou tputs to this variable the offset of programmabl e logical lens position found to be best relative to the start position of the scan. in other words, after each scan, the be st lens position found is af.positions[af.initpos+af.bestposition]. when af.mode bit 7 is 0 and bit 6 is 1 (creep compensation mode is enabled) af.bestposition is used during lens repositioning triggered by setting bit 1 of af.mod e to 1. it is us ed to store the desired final lens posi tion, which is assumed to be the same as afm.curpos before the reposition ing. as a result after every successful repositioning, af.bes tposition equals afm.curpos. 18 shath uchar 10 rw sharpness score variability threshold. only af windows whose min. and max. normalized sharpne ss scores satisfy the condition 1-(min.score/max.score) > = af.shath/256 are used to select best focus position. 19 positions[0] uchar 0 rw programmable logical lens position 0 20 positions[1] uchar 28 rw programmable logical lens position 1 21 positions[2] uchar 56 rw programmable logical lens position 2 22 positions[3] uchar 85 rw programmable logical lens position 3 23 positions[4] uchar 113 rw programmable logical lens position 4 24 positions[5] uchar 141 rw programmable logical lens position 5 25 positions[6] uchar 170 rw programmable logical lens position 6 26 positions[7] uchar 198 rw programmable logical lens position 7 27 positions[8] uchar 226 rw programmable logical lens position 8 28 positions[9] uchar 255 rw programmable logical lens position 9 29 positions[10] uchar 27 rw programmable logical lens position 10 30 positions[11] uchar 55 rw programmable logical lens position 11 31 positions[12] uchar 84 rw programmable logical lens position 12 32 positions[13] uchar 112 rw programmable logical lens position 13 33 positions[14] uchar 140 rw programmable logical lens position 14 34 positions[15] uchar 169 rw programmable logical lens position 15 35 positions[16] uchar 197 rw programmable logical lens position 16 36 positions[17] uchar 225 rw programmable logical lens position 17 37 positions[18] uchar 254 rw programmable logical lens position 18 38 positions[19] uchar 26 rw programmable logical lens position 19 table 15: driver variables-auto fo cus driver (id = 5) (continued) off name type default rw description www.datasheet.co.kr datasheet pdf - http://www..net/
pdf: 09005aef8202ec2e/source: 09005aef8202ebf7 micron technology, inc., reserves the right to change products or specifications without notice. MT9D111__5_rev5.fm - rev. b 2/06 en 85 ?2004 micron technology, inc. all rights reserved. MT9D111 - 1/3.2-inch 2-megapixel soc digital image sensor jpeg indirect registers micron confidential and proprietary auto focus mechanics table 16: driver variables ? auto focus mechani cs driver (id = 6) offs name type default 1 rw description 0 vmt void* e0ae rw pointer to the driver?s vi rtual method table (vmt). the afm driver includes a separa te set of control methods for each supported type of auto focus mechanism (see afm.type below). each set of methods is assessable via a separate vmt. pointing afm. vmt to one of those vmts either enables the af driver to control the corresponding type of af mechanism via the gpio or takes away the control of th e gpio from the af driver. 2typeuchar 0 rw type of auto focus mech anism (lens actuator) used: 0 ? none, 1 ? helimorph, 2 ? stepper motor, 3 ? ad5398. at sequencer initialization, th is variable is set to 0 and the afm.vmt is pointed to the default vmt of the afm driver, which makes the gpio inaccessible to the af driver. enabling the af driver to control a lens actuator via the gpio involves 2 steps. first, afm.type must be set to t+128, where t is 1, 2 or 3. second, the sequencer must be given refresh command by setting seq.cmd to 5. the nonzero 7th bit in afm.type forces the sequencer to call afm_init function upon th at command. the function makes afm.type equal to t and points afm.vmt to the vmt through which the af m driver methods for controlling actuator type t can be called. 3curposuchar0 rw current logical position 2 4 prepos uchar 0 rw previous logical position 5 status uchar 0 rw lens actuator status: bit 0 ? 0 if all is ok, 1 if the actuator reported an error bit 1 ? 0 if the lens is stationary, 1 if it is moving bit 2 ? 0 if last lens movement direction was forward (+), 1 if the direction was backward (-) bits [4:3] ? number of current step per motor position if afm.type=2; othe rwise unused. after sending a command to ch ange lens position to the lens actuator, the afm driver sets bit 1 of afm.status to 1. the value of the bit rema ins 1 until th e afm driver gets information that the lens is not moving (either has stopped at the desired new position or has failed to reach it). the af driver wai ts through all times when the lens is moving by having afm.status updated once every frame, reading its bit 1 and immediately going back to sleep if it equals 1. 6posminuchar 0 rw lower limit of physical position range 3 7 posmax uchar 0 rw upper limit of physical posi tion range. can be set below afm.posmin to swap forw ard (+) and backward (-) directions of lens movement. 8 posmacro uchar 0 rw logical macro position www.datasheet.co.kr datasheet pdf - http://www..net/
pdf: 09005aef8202ec2e/source: 09005aef8202ebf7 micron technology, inc., reserves the right to change products or specifications without notice. MT9D111__5_rev5.fm - rev. b 2/06 en 86 ?2004 micron technology, inc. all rights reserved. MT9D111 - 1/3.2-inch 2-megapixel soc digital image sensor jpeg indirect registers micron confidential and proprietary 9 backlash uchar 0 rw logical size of backlash-c ompensating step that the af driver can optionally use in lens positioning after the first scan. if bits [7:6] of af.mode are set to 0, this positioning is done by moving the lens directly from the end position of the scan, af.positions[af.initpos+af.n umsteps-1] to the logical position found best, af.position[af.initpos+af.bestp osition]. the direction of this move is opposite to th e direction of the scan, and therefore the move may no t bring the lens to its intended physical destination, unless its logical length is adjusted upward to compensate for lens actuator backlash. to make this adjustment, the af driver subtracts afm.backlash from the value of af.positions[af.initpos+af.b estposition] and gives the result to the afm driver as the logical posi tion to move the lens to. negative results of the subtraction are replaced with 0. subtracti ng afm.backlash makes sense only when af.positions[af. initpos+af.numsteps-1] > af.positions[af.initpos+af .bestposition]; otherwise addition is required. since th e af driver always subtracts afm.backlash, backlash compensation using this variable is not recommended after sc ans done in the negative direction (e.g. from logical position 255 to logical position 0). table 16: driver variables ? auto focus mechanics driv er (id = 6) (continued) offs name type default 1 rw description www.datasheet.co.kr datasheet pdf - http://www..net/
pdf: 09005aef8202ec2e/source: 09005aef8202ebf7 micron technology, inc., reserves the right to change products or specifications without notice. MT9D111__5_rev5.fm - rev. b 2/06 en 87 ?2004 micron technology, inc. all rights reserved. MT9D111 - 1/3.2-inch 2-megapixel soc digital image sensor jpeg indirect registers micron confidential and proprietary 10 custctrl uchar 0 rw custom controls: 1-bit option switches and fine-tuning parameters for actuator cont rol methods. the function of different bits of this vari able depends on the current value of afm.type. if afm.type = 1, then: bit 0 ? selects the length of commands sent to hd80 helimorph driver by functi on afm_setposhelimorph (0 - 2 bytes, 1 - 3 bytes in cluding enable byte), bit 1 ? selects one of 2 possible relations between the argument of the function afm_setposhelimorph, bpos, and position byte sent to hd80 helimorph driver (0 means send bpos, 1 - send 255-bpos, to reverse the direction of lens movement), bit 2 ? selects one of 2 positions that helimorph can assume upon command to exit standby (0 ? afm.posmin, 1 ? afm.posmax), bits [7:3] - unused. if afm.type = 2, then: bit 0 ? selects direction of lens motion if bit 1 is set to 1, bit 1 ? determines how function afm_setposstmotor interprets its 1 ? byte argument (0 ? as desired logical lens position, 1 ? as number of physical steps to make in the direction indicated by bit 0), bit 2 ? enables periodic forcing of stepper-motor-driving outputs into calculat ed logical states (0 ? forcing disabled, outputs are only toggled as needed, 1 ? forcing enabled), bit 3 ? when set to 1, enables powering stepper motor down after every movement (the motor is always powered up before movements, but powering down is optional), bit 4 ? enables repositioning of stepper motor by function afm_resetstmotor upon command to enter standby (1 ? enable, 0 ? disable), bit 5 ? enables repositioning of stepper motor by function afm_resetstmotor upon command to exit standby (1 ? enable, 0 ? disable), bits [7:6] ? allow one to slow down initial portions of stepper-motor-driving waveforms that cannot be entirely generated by MT9D111 waveform generator (higher value = slower waveforms). if afm.type = 0, a fm.custctrl is unused. 11 timer.vmt void* e9c6 rw pointer to timer vmt. default timer vmt located in rom contains pointers to the following public functions: afm_wait, afm_timersetdelay, afm_timersettimetomove, afm_timerisstopped. the pointers are all of type void* and have the following names: pwait, psetdelay, psetti metomove, ptimerisstopped. 13 timer.starttime uint 0 rw timer start time. 15 timer.stoptime uint 0 rw timer stop time. table 16: driver variables ? auto focus mechanics driv er (id = 6) (continued) offs name type default 1 rw description www.datasheet.co.kr datasheet pdf - http://www..net/
pdf: 09005aef8202ec2e/source: 09005aef8202ebf7 micron technology, inc., reserves the right to change products or specifications without notice. MT9D111__5_rev5.fm - rev. b 2/06 en 88 ?2004 micron technology, inc. all rights reserved. MT9D111 - 1/3.2-inch 2-megapixel soc digital image sensor jpeg indirect registers micron confidential and proprietary 17 timer.hiwordmclkfreq uint 0 rw master clock frequency in hz divided by 65536. used to convert delay times in millis econds (for example, the values of afm.ti mer.maxshortdelay) to corresponding counts of master clock cycles that can be programmed into the timer. 19 timer.maxshortdelay uint 0 rw maximum expected duration of short lens move. should be given in milliseconds. used by the afm driver function afm_timersettime tomove to compute lens travel time estimates. 21 timer.maxlongdelay uint 0 rw maximum expected duration of long lens move. should be given in milliseconds. used by the afm driver function afm_timersettime tomove to compute lens travel time estimates. 23 timer.maxquickmove uchar 0 rw maximum length of short lens move (or threshold between short and long moves) . used by the afm driver function afm_timersettime tomove to compute lens travel time estimates. table 16: driver variables ? auto focus mechanics driv er (id = 6) (continued) offs name type default 1 rw description www.datasheet.co.kr datasheet pdf - http://www..net/
pdf: 09005aef8202ec2e/source: 09005aef8202ebf7 micron technology, inc., reserves the right to change products or specifications without notice. MT9D111__5_rev5.fm - rev. b 2/06 en 89 ?2004 micron technology, inc. all rights reserved. MT9D111 - 1/3.2-inch 2-megapixel soc digital image sensor jpeg indirect registers micron confidential and proprietary 24 timer.config uchar 0 rw bits [1:0] of this variable determine how afm.timer.maxshortdelay, afm.timer.maxlongdelay, and afm.timer. maxquickmove are used to estimate duration of lens movements. bits [7:2] are unused. if a command-driven lens actu ator does not provide any feedback about its status after receiving a command to move an af lens, the afm driver must somehow predict how long the lens will be moving, to prevent the af driver from collecting sharpness scores and issuing new commands during its movement. the need for predictions of lens travel time is satisfied rather inexpensively by the afm driver function afm_timersettimetomove, which takes as arguments 2 logical lens positions and e stimates the time required to move the lens between them. the function can use 2 different estimation methods, both of which rely on 3 user-set parameters, afm.timer.maxshortdelay, afm.timer.maxlongdelay, and afm.timer.maxquickmove, as a sole source of information about how fast the lens actuator moves the lens. the default method of piecewise linear estimation is used when bit 0 of afm.time r.config is cleared. setting this bit to 1 enables the al ternative bipolar method. the bipolar method is very simp le: if the distance between the 2 logical posi tions given to afm_timersettimetomove as arguments exceeds afm.timer.maxqui ckmove, then afm.timer.maxlongdelay is selected as the proper lens travel time estimate. otherwise, unless the 2 logical positions are the same, the estimate equals afm.timer.maxshortdelay. if the 2 positions are the same, the estimate should be 0, and indeed is 0 if bit 1 of afm.timer.config is cleared. however, if this bit is set to 1 and the positions are th e same, the function afm_timersettimetomove outputs afm.timer.maxshortdelay instead of 0. 25 si.vmt void* e9ce rw pointer to serial interface vmt. default serial interface vmt located in rom contains pointers to the follow ing public functions: afm_sisendcmd, afm_sisetactvflag, afm_sisendbyte, afm_sirecvbyte. the pointers are all of type void* and have the following names: psendcmd, psetactvflag, psendbyte, precvbyte. 27 si.clkmask uint 0 rw mask selecting one of gpio pads as the clock line of dedicated two-wire serial interface between the MT9D111 and a lens actuator (for example, helimorph). 29 si.datamask uint 0 rw mask selecting one of gpio pads as the data line of the dedicated two-wire serial inte rface to the lens actuator. table 16: driver variables ? auto focus mechanics driv er (id = 6) (continued) offs name type default 1 rw description www.datasheet.co.kr datasheet pdf - http://www..net/
pdf: 09005aef8202ec2e/source: 09005aef8202ebf7 micron technology, inc., reserves the right to change products or specifications without notice. MT9D111__5_rev5.fm - rev. b 2/06 en 90 ?2004 micron technology, inc. all rights reserved. MT9D111 - 1/3.2-inch 2-megapixel soc digital image sensor jpeg indirect registers micron confidential and proprietary 31 si.clkqtrprd uint 0 rw delay for slowing down seri al interface transmissions. the period of serial interf ace clock is asymptotically proportional to si.clkqtrprd. 33 si.needsack uchar 0 rw switch enabling detection of ack bits from the lens actuator (0 ? disabled, 1 ? enabled). 34 si.slaveaddr uchar 0 rw lens actuator address us ed in serial interface transmissions. 35 sm.enabmask uint 0 rw mask selecting one of gp io pads as stepper-motor- enabling output. 37 sm.drv0mask uchar 0 rw mask selecting one of gpio pa ds (gpio[1] by default) as first stepper driving output. 38 sm.drv1mask uchar 0 rw mask selecting one of gpio pa ds (gpio[3] by default) as the second stepper driving output. 39 sm.drv2mask uchar 0 rw mask selecting one of the gpio pads as third stepper- motor-driving output 40 sm.drv3mask uchar 0 rw mask selecting one of the gp io pads as fourth stepper- motor-driving output 41 sm.drvsqtrprd uchar 0 rw delay for lengthening the period of stepper motor driving waveforms. the numb er of master/gpio clock cycles in this period asymptotically approaches 8 times the sm.drvsqtrprd. 43 sm.drvsgenmode uchar 0 rw this variable tells the af m driver how to program the gpio to generate stepper motor driving waveforms. bits [1:0] ? size of smallest stepper motor move (0 ? 4 steps, 1? 1 step, 2 ? 2 steps) bit 2 ? if 0, use the waveform ge nerator in 8-bit counter mode, if 1, use it in 16-bit counter mode bit 3 ? if 0, use clock divider 1, if 1, use clock divider 2 bits [7:4] ? clock divider setting (used by the afm driver only if it is higher than the setting the driver has automatically calculated). 44 sm.pienabmask uint 0 rw mask selecting one of gpio pads as photointerrupter- enabling output. 46 sm.pioutmask uint 0 rw mask selecting one of gpio pads as photointerrupter sensing input. 48 sm.piedgeoffset uchar 0 rw distance (in units of sm allest stepper motor move) between the position of photointerrupter signal edge and desired initial posi tion of stepper motor. 49 sm.piconfig uchar 0 rw photointerrupter (pi) configuration bit 0 ? if 0, do not use pi, if 1, use it for initial stepper positioning bit 1 ? if 0, pi signal edge is near logical position 0, if 1 ? near 255. bit2 ? pi active state (0 ? low, 1 ? high). bit 3 ? if 1, pi is in the active state at initial stepper position, if 0 ? it is not. bit 4 ? if 0, initial logical stepper position is 0, if 1 ? 255. bits [7:5] ? delay between powering up the pi and sensing its output the first time. note: 1. shown default values co rrespond to afm.type = 0 table 16: driver variables ? auto focus mechanics driv er (id = 6) (continued) offs name type default 1 rw description www.datasheet.co.kr datasheet pdf - http://www..net/
pdf: 09005aef8202ec2e/source: 09005aef8202ebf7 micron technology, inc., reserves the right to change products or specifications without notice. MT9D111__5_rev5.fm - rev. b 2/06 en 91 ?2004 micron technology, inc. all rights reserved. MT9D111 - 1/3.2-inch 2-megapixel soc digital image sensor jpeg indirect registers micron confidential and proprietary 2. when the afm driver exchanges informat ion about lens position an d motion with the af driv er, it is done in terms of logical position and displacement. logical position range is from 0 to 255, irrespective of the lens actuator used and the number of distinct physical positions it can put the lens in. 3. if the lens actuator is physically or logically incapable of putting the lens in 256 evenly spaced positions, the afm driver must translate between the range of logical position s recognized by the af driver and the set of physical positions that the actuator ca n assume. the positions in this set can usually be assi gned integer numbers forming a contiguous range. the limits of this range are the minimum information needed by the afm driver to convert the logical positions and displacemen ts to their physical equivalents. www.datasheet.co.kr datasheet pdf - http://www..net/
pdf: 09005aef8202ec2e/source: 09005aef8202ebf7 micron technology, inc., reserves the right to change products or specifications without notice. MT9D111__5_rev5.fm - rev. b 2/06 en 92 ?2004 micron technology, inc. all rights reserved. MT9D111 - 1/3.2-inch 2-megapixel soc digital image sensor jpeg indirect registers micron confidential and proprietary context table 17: driver variables ? mode/context driver (id = 7) offs name type assoc.h/w reg rw default description 0 vmt pointer uint local rw 59871 pointer to virtual method table. 2 context uchar local rw 0 current context (0 = a, 1 = b). 3 output width_a uint r0x16:1 rw 800 output size of final image for context a. must be equal to or smaller than crop dimension. 5 output height_a uint r0x17:1 rw 600 output size of final image for context a. must be equal to or smaller than crop dimension. 7 output width_b uint r0x16:1 rw 1600 output size of fina l image for context b. must be equal to or smaller than crop dimension. 9 output height_b uint r0x17:1 rw 1200 output size of fina l image for context b. must be equal to or smaller than crop dimension. 11 mode_config uint r0xa:2 rw 0x10 bit 4 ? j pg bypass: context a. bit 5 ? j pg bypass: context b. set to ?0? to enable j peg. 13 pll_lock_delay uint local rw 200 delay between pll enable and start of microcontroller operation (no. of clock cycles x 100). 15 s_row_start_a uint r0x01:0 rw 28 first sensor-readout row (context a shadow register). 17 s_col_start_a uint r0x02:0 rw 60 first sensor-readout column (context a shadow register). 19 s_row_height_a uint r0x03:0 rw 1200 no. of sensor-read out rows (context a shadow register). 21 s_col_width_a uint r0x04:0 rw 1600 no. of sensor-readou t columns (context a shadow register). 23 s_ext_delay_a uint r0x0b:0 rw 0 extra sensor delay per frame (context a shadow register). 25 s_row_speed_a uint r0x0a:0 rw 1 row speed (context a shadow register). 27 s_row_start_b uint r0x01:0 rw 28 first sensor-readout row (context b shadow register). 29 s_col_start_b uint r0x02:0 rw 60 first sensor-readout column (context b shadow register). 31 s_row_height_b uint r0x03:0 rw 1200 no. of sensor-read out rows (context b shadow register). 33 s_col_width_ b uint r0x04:0 rw 1600 no. of sensor-readou t columns (context b shadow register). 35 s_ext_delay_b uint r0x0b:0 rw 1050 extra sensor delay per frame (context b shadow register). 37 s_row_speed_b uint r0x0a:0 rw 1 row speed (context b shadow register). 39 crop_x0_a uint r0x11:1 rw 0 lower-x decimator zoom window (context a shadow register). 41 crop_x1_a uint r0x12:1 rw 800 upper-x decimator zoom window (context a shadow register). www.datasheet.co.kr datasheet pdf - http://www..net/
pdf: 09005aef8202ec2e/source: 09005aef8202ebf7 micron technology, inc., reserves the right to change products or specifications without notice. MT9D111__5_rev5.fm - rev. b 2/06 en 93 ?2004 micron technology, inc. all rights reserved. MT9D111 - 1/3.2-inch 2-megapixel soc digital image sensor jpeg indirect registers micron confidential and proprietary 43 crop_y0_a uint r0x13:1 rw 0 lower-y decimator zoom window (context a shadow register). 45 crop_y1_a uint ir0x14:1 /w 600 upper-y decimator zoom window (context a shadow register). 47 dec_ctrl_a uint r0x15:1 r/w 0 decimator control register (context a shadow register). 53 crop_x0_b uint r0x11:1 rw 0 lower-x decimator zoom window (context b shadow register). 55 crop_x1_b uint r0x12:1 rw 1600 upper-x decimator zoom window (context b shadow register) 57 crop_y0_b uint r0x13:1 rw 0 lower-y decimator zoom window (context b shadow register). 59 crop_y1_b uint r0x14:1 rw 1200 upper-y decimator zoom window (context b shadow register). 61 dec_ctrl_b uint r0x15:1 rw 0 decimator control register (context b shadow register). 67 gam_cont_a uchar local rw 0x42 gamma and contrast settings (context a shadow register) gamma setting: bits 0:2: 0 ? gamma = 1.0 1 ? gamma = 0.56 2 ? gamma = 0.45 3 ? use user-defined gamma table contrast setting: bits 4:6: 0 ? no contrast increase (slope = 100%) 1 ? some contrast increase (slope = 125%) 2 ? more contrast increase (slope = 150%) 3 ? most contrast increase (slope = 175%) 4 ? noise-reduction contrast 68 gam_cont_b uchar local rw 0x42 gamma and contrast settings (context b shadow register) gamma setting: bits 0:2: 0 ? gamma = 1.0 1 ? gamma = 0.56 2 ? gamma = 0.45 3 ? use user-defined gamma table contrast setting: bits 4:6: 0 ? no contrast increase (slope = 100%) 1 ? some contrast increase (slope = 125%) 2 ? more contrast increase (slope = 150%) 3 ? most contrast increase (slope = 175%) 4 ? noise-reduction contrast 69 gamma_table_a_0 uchar r0xb2:1[7:0] rw 0 user-defined gamma table values (context a shadow register). 70 gamma_table_a_1 uchar r0xb2:1[15:8] rw 39 user-defined gamma table values (context a shadow register). 71 gamma_table_a_2 uchar r0xb3:1[7:0] rw 53 user-defined gamma table values (context a shadow register). 72 gamma_table_a_3 uchar r0xb3:1[15:8] rw 72 user-defined gamma table values (context a shadow register). table 17: driver variables ? mode/context driver (id = 7) (continued) offs name type assoc.h/w reg rw default description www.datasheet.co.kr datasheet pdf - http://www..net/
pdf: 09005aef8202ec2e/source: 09005aef8202ebf7 micron technology, inc., reserves the right to change products or specifications without notice. MT9D111__5_rev5.fm - rev. b 2/06 en 94 ?2004 micron technology, inc. all rights reserved. MT9D111 - 1/3.2-inch 2-megapixel soc digital image sensor jpeg indirect registers micron confidential and proprietary 73 gamma_table_a_4 uchar r0xb4:1[7:0] rw 99 user-defined gamma table values (context a shadow register). 74 gamma_table_a_5 uchar r0xb4:1[15:8] rw 119 user-defined gamma table values (context a shadow register). 75 gamma_table_a_6 uchar r0xb5:1[7:0] rw 136 user-defined gamma table values (context a shadow register). 76 gamma_table_a_7 uchar r0xb5:1[15:8] rw 150 user-defined gamma table values (context a shadow register). 77 gamma_table_a_8 uchar r0xb6:1[7:0] rw 163 user-defined gamma table values (context a shadow register). 78 gamma_table_a_9 uchar r0xb6:1[15:8] rw 175 user-defined gamma table values (context a shadow register). 79 gamma_table_a_10 uchar r0xb7:1[7:0] rw 186 user-defined gamma table values (context a shadow register). 80 gamma_table_a_11 uchar r0xb7:1[15:8] rw 196 user-defined gamma table values (context a shadow register). 81 gamma_table_a_12 uchar r0xb8:1[7:0] rw 206 user-defined gamma table values (context a shadow register). 82 gamma_table_a_13 uchar r0xb8:1[15:8] rw 215 user-defined gamma table values (context a shadow register). 83 gamma_table_a_14 uchar r0xb9:1[7:0] rw 224 user-defined gamma table values (context a shadow register). 84 gamma_table_a_15 uchar r0xb9:1[15:8] rw 232 user-defined gamma table values (context a shadow register). 85 gamma_table_a_16 uchar r0xba:1[7:0] rw 240 user-defined gamma table values (context a shadow register). 86 gamma_table_a_17 uchar r0xba:1[15:8] rw 248 user-defined gamma table values (context a shadow register). 87 gamma_table_a_18 uchar r0xbb:1[7:0] rw 255 user-defined gamma table values (context a shadow register). 88 gamma_table_b_0 uchar r0xb2:1[7:0] rw 0 user-defined gamma table values (context b shadow register). 89 gamma_table_b_1 uchar r0xb2:1[15:8] rw 39 user-defined gamma table values (context b shadow register). 90 gamma_table_b_2 uchar r0xb3:1[7:0] rw 53 user-defined gamma table values (context b shadow register). 91 gamma_table_b_3 uchar r0xb3:1[15:8] rw 72 user-defined gamma table values (context b shadow register). 92 gamma_table_b_4 uchar r0xb4:1[7:0] rw 99 user-defined gamma table values (context b shadow register). 93 gamma_table_b_5 uchar r0xb4:1[15:8] rw 119 user-defined gamma table values (context b shadow register). 94 gamma_table_b_6 uchar r0xb5:1[7:0] rw 136 user-defined gamma table values (context b shadow register). 95 gamma_table_b_7 uchar r0xb5:1[15:8] rw 150 user-defined gamma table values (context b shadow register). 96 gamma_table_b_8 uchar r0xb6:1[7:0] rw 163 user-defined gamma table values (context b shadow register). table 17: driver variables ? mode/context driver (id = 7) (continued) offs name type assoc.h/w reg rw default description www.datasheet.co.kr datasheet pdf - http://www..net/
pdf: 09005aef8202ec2e/source: 09005aef8202ebf7 micron technology, inc., reserves the right to change products or specifications without notice. MT9D111__5_rev5.fm - rev. b 2/06 en 95 ?2004 micron technology, inc. all rights reserved. MT9D111 - 1/3.2-inch 2-megapixel soc digital image sensor jpeg indirect registers micron confidential and proprietary 97 gamma_table_b_9 uchar r0xb6:1[15:8] rw 175 user-defined gamma table values (context b shadow register). 98 gamma_table_b_10 u char r0xb7:1[7:0] rw 186 user-defined gamma table values (context b shadow register). 99 gamma_table_b_11 uchar r0xb7:1[15:8] rw 196 user-defined gamma table values (context b shadow register). 100 gamma_table_b_12 uchar r0xb8:1[7:0] rw 206 user-defined gamma table values (context b shadow register). 101 gamma_table_b_13 uchar r0xb8:1[15:8] rw 215 user-defined gamma table values (context b shadow register). 102 gamma_table_b_14 uchar r0xb9:1[7:0] rw 224 user-defined gamma table values (context b shadow register). 103 gamma_table_b_15 uchar r0xb9:1[15:8] rw 232 user-defined gamma table values (context b shadow register). 104 gamma_table_b_16 u char r0xba:1[7:0] rw 240 user-defined gamma table values (context b shadow register). 105 gamma_table_b_17 uchar r0xba:1[15:8] rw 248 user-defined gamma table values (context b shadow register). 106 gamma_table_b_18 u char r0xbb:1[7:0] rw 255 user-defined gamma table values (context b shadow register). 107 fifo_config0 _a uint r0x0d:2 rw 0x0027 fifo buffer configuration 0 (context a shadow register). 109 fifo_config1_a uint r0x0e:2 rw 0x0002 fifo buffer configuration 1 (context a shadow register). 111 fifo_config2_a uchar r0x0f:2 rw 0x21 fifo buffer configuration 2 (context a shadow register). 112 fifo_len_timin g_a uint r0x12:2 rw 0x0606 fifo spoof frame line timing (context b shadow register). 114 fifo_config0 _b uint r0x0d:2 rw 0x0067 fifo buffer configuration 0 (context b shadow register). 116 fifo_config1_b uint r0x0e:2 rw 0x050a fifo buffer configuration 1 (context b shadow register). 118 fifo_config2 _b uchar r0x0f:2 rw 0x0003 fifo buffer configuration 2 (context b shadow register). 119 fifo_len_timin g_b uint r0x12:2 rw 0x0606 fifo spoof frame line timing (context b shadow register). 121 spoof_width_b uint r0x10:2* rw 1600 fifo spoof frame line timing (context b shadow register). *if in uncompressed mode, 2x this value is uploaded to r0x10. 123 spoof_height_b uint r0x11:2 rw 600 fifo spoof frame line timing (context b shadow register). 125 out_format_a uchar r0x97:1 rw 0 output format config . (context a shadow register). 126 out_format_b uchar r0x97:1 rw 0 output format config. (context b shadow register). 127 spec_effects_a uint r0xa4:1 rw 0x6440 special effects selection (context a shadow register). table 17: driver variables ? mode/context driver (id = 7) (continued) offs name type assoc.h/w reg rw default description www.datasheet.co.kr datasheet pdf - http://www..net/
pdf: 09005aef8202ec2e/source: 09005aef8202ebf7 micron technology, inc., reserves the right to change products or specifications without notice. MT9D111__5_rev5.fm - rev. b 2/06 en 96 ?2004 micron technology, inc. all rights reserved. MT9D111 - 1/3.2-inch 2-megapixel soc digital image sensor jpeg indirect registers micron confidential and proprietary 129 spec_effects_b uint r0xa4:1 rw 0x6440 special effects selection (context b shadow register). 131 y_rgb_offset_a uchar r0xbf:1 rw 0 y/rgb offset setting (context a shadow register). 132 y_rgb_offset_b uchar r0xbf:1 rw 0 y/rgb offset setting (context b shadow register). table 17: driver variables ? mode/context driver (id = 7) (continued) offs name type assoc.h/w reg rw default description www.datasheet.co.kr datasheet pdf - http://www..net/
pdf: 09005aef8202ec2e/source: 09005aef8202ebf7 micron technology, inc., reserves the right to change products or specifications without notice. MT9D111__5_rev5.fm - rev. b 2/06 en 97 ?2004 micron technology, inc. all rights reserved. MT9D111 - 1/3.2-inch 2-megapixel soc digital image sensor jpeg indirect registers micron confidential and proprietary jpeg table 18: driver variables ? jpeg driver (id = 9) offs name type def rw description 0 vmt void* 58451 rw reserved. 2 width uint 1600 r image width (see mode.output_width). 4 height uint 1200 r image height (see mode.output_height). 6formatuchar 0 rw image format: 0 ? ycbcr 4:2:2 1 ? ycbcr 4:2:0 2 ? monochrome 7configuchar 52 rw configuration and handshaking: bit 0 ? if 1, video; if 0, still snapshot bit 1 ? enable handshaking with host at every error frame bit 2 ? enable retry after an unsuccessful encode or transfer bit 3 ? host indicates it is ready for next frame bit 4 ? enable scaled quantization table generation bit 5 ? enable auto-select quantization table bit 7:6 ? quantization table id 8 restartint uint 0 rw restart marker interval: 0 = restart marker is disabled 10 qscale1 uchar 6rwbit 6:0 ? scaling factor for first set of quantization tables bit 7 ? 1, new scaling factor value 11 qscale2 uchar 9rwbit 6:0 ? scaling factor for second se t of quantization tables bit 7 ? if 1, new scaling factor value 12 qscale3 uchar 12 rw bit 6:0 ? scaling factor for third se t of quantization tables bit 7 ? if 1, new scaling factor value 13 timeoutframes uchar 10 rw number of frames to time out when host is not responding (setting bit 3 of config) to an unsuccessful j peg frame while bit 1 of config is set. 14 state uchar 0 r j peg driver state. 15 datalengthmsb uchar r bit [23:16] of previous frame j peg data length. 16 datalengthlsbs uint r bit [15:0] of previous frame j peg data length. www.datasheet.co.kr datasheet pdf - http://www..net/
pdf: 09005aef8202ec2e/source: 09005aef8202ebf7 micron technology, inc., reserves the right to change products or specifications without notice. MT9D111__5_rev5.fm - rev. b 2/06 en 98 ?2004 micron technology, inc. all rights reserved. MT9D111 - 1/3.2-inch 2-megapixel soc digital image sensor jpeg indirect registers micron confidential and proprietary histogram table 19: driver variables ? histogram driver (id = 11) offs name type def rw description 0 vmt void* 59880 rw reserved. 2 dlevelbufferspeed uchar 8 rw response speed, 1?32 ; 32-maximum speed. 3 scalegfactor uchar 1 rw scale factor for histogram window size. 4 maxdlevel uchar 64 rw maximum subtracted offset. set to ?0? to disable subtraction. 5 percent uchar 0 rw percent of pixels to keep black; 10-bits data / 4. setting >0 clips black. 6 lowerlimit1 uchar 0 rw offset for bin 0, divided by 4 on 10-bit scale. 7binsize1uchar 2 rw bin width, 0?4lsb, 1?8lsb, 2? 16lsb, 7?512lsb on a 10-bit scale. 8 lowerlimit2 uchar 192 rw offset for bin 0, divided by 4 on 10-bit scale. 9binsize2uchar 4 rw bin width, 0?4lsb, 1?8lsb, 2? 16lsb, 7?512lsb on a 10-bit scale. 10 dlevel uchar r current subtracted offset. 11 dlevel_buf uint r buffered current offset. 13 factorhi uchar 10 rw factor of overexposure co mpensation for mettering mode. 14 percenthi uchar 0 rw highlight clipping 255 - 100% www.datasheet.co.kr datasheet pdf - http://www..net/
pdf: 09005aef8202ec2e/source: 09005aef8202ebf7 micron technology, inc., reserves the right to change products or specifications without notice. MT9D111__5_rev5.fm - rev. b 2/06 en 99 ?2004 micron technology, inc. all rights reserved. MT9D111 - 1/3.2-inch 2-megapixel soc digital image sensor jpeg indirect registers micron confidential and proprietary mcu register list and memory map memory map table 20: memory map address type description 0x8000-0xffff rom system rom, 32k 0xfffe-0xffff ? reset vector 0xfffc-0xfffd ? driver table pointer 0xfff8-0xfff9 ? illegal opcode vector 0xfff6-0xfff7 ? software interrupt vector 0xfff4-0xfff5 ? xirq/watchdog vector 0x1000-0x10ff sfr see table 21, special fu nction register list. 0x0400-0x07ff ram user sram, 1k. this sram is no t used by the rom firmware. use it to upload custom code. 0x0000-0x03ff ram system sram, 1k. contains stack and data used by rom firmware. 0x0380-0x03ff ? stack 0x0000-0x00ff ? system short data segment www.datasheet.co.kr datasheet pdf - http://www..net/
pdf: 09005aef8202ec2e/source: 09005aef8202ebf7 micron technology, inc., reserves the right to change products or specifications without notice. MT9D111__5_rev5.fm - rev. b 2/06 en 100 ?2004 micron technology, inc. all rights reserved. MT9D111 - 1/3.2-inch 2-megapixel soc digital image sensor jpeg indirect registers micron confidential and proprietary special function registers - system table 21: special function register list name hex# description native registers pactl 0x1026 pulse accumulator control [2] ? ic4/oc5 input capture 4/output compare 5 select option 0x1039 system configuration options register [5] ? irqe 0 = low level sensitiv e,1 = falling edge sensitive hprio 0x103c highest priority i-bit interr upt and miscellaneous register [5] ? mda mode select a bit [3:0] ? psel[3:0] priority select bits init 0x103d ram and i/o mapping register [3:0] ? reg[3:0] ram map position bits [7:4] ? ram[3:0] register block position bits math coprocessor registers creg[31:0] 0x10c0?0x10c3 32-bit data register aluc 0x10c4 arithmetic logic unit control register [7] ? signed number enable [6] ? division enable [5] ? multiply with accumulated product enable [4] ? division compensation for concatenated quotient enable [3] ? function start trigger bit [2] ? overflow interrupt enable [1] ? divide by zero interrupt enable [0] ? arithmetic operation completion interrupt enable areg[15:0] 0x10c5?0x10c6 16-bit data register breg 0x10c70?0x10c8 16-bit data register aluf 0x10c9 arithmetic logic unit flag register [7] ? negative result flag [6] ? remainder zero flag [5:3] ? always ?0? [2] ? overflow msb on creg detected flag [1] ? divide by zero detected fl ag; cleared by writing a ?1? [0] ? arithmetic operation completed flag; cleared by writing a ?1? sleep registers sleep 0x1040 sleep register 1 ? ?1? = gpio wakeup 0 ? ?1? = line counter wakeup; write ?1? to clear read this register to attempt sleeping wakeuplinecnt 0x1042/3 line counter wakeup (msb) 15 ? ?0? = wake up on positive edge/level 14 ? ?1? = wake up on level, ?0?= on edge [10:0] ? line number the following values are special: 0x07ff ? disable wakeup 0x07fe ? wake up on soc frame enable 0x07fd ? wake up on sensor frame enable 0x07fc ? wake up on j peg frame enable 0x07fb ? wake up on fifo frame enable www.datasheet.co.kr datasheet pdf - http://www..net/
pdf: 09005aef8202ec2e/source: 09005aef8202ebf7 micron technology, inc., reserves the right to change products or specifications without notice. MT9D111__5_rev5.fm - rev. b 2/06 en 101 ?2004 micron technology, inc. all rights reserved. MT9D111 - 1/3.2-inch 2-megapixel soc digital image sensor jpeg indirect registers micron confidential and proprietary linecnt 0x1046/7 line counter (read-only) current line number increm ented at every line end: ? 0 at frame start ? 0x07ff at frame end address 0x1046 (msb) must be read first. clockcnt 0x1048-b clock counter (read-only) address 0x1048 (msb) must be read first. restartcode 0x104c warm restart register bits 2:0 ? warm restart code value of 7 indicates watchdog caused reset. infocode 0x104d debug information, maps to two-wi re serial interface r195[15:8]. watchdog 0x104e watchdog register bit 3 ? 1 watchdog causes xirq, 0=reset bits 2:0 ? 0 disable, other-frame number th at triggers watchdog (1 = next frame) clear sleep reg. to reset watchdog. bootmode 0x104f boot mode, read-only. maps to two-wire serial interface r195[7:0]. register i/o bus master write_iopage 0x1060 register page number to write [0] ? page number (ifp/sensor core) write_ioadr 0x1061 register address to write iodata 0x1062/3 data from read transaction (read) data for write operation (write) write data to this register to init iate a register bus write transaction. read_iopage 0x1064 register page number to read bit[0] page number (ifp/sensor core) read_ioadr 0x1065 register address for read transaction write to initiate read transaction iostatus 0x1066 i/o bus transaction status (read-only) [7] ? 1 = write busy [6] ? 1 = read busy read 0 to ensure i/o transaction is complete. variable access (slave dma) r200 0x1050/1 driver table pointer table 21: special function re gister list (continued) name hex# description www.datasheet.co.kr datasheet pdf - http://www..net/
pdf: 09005aef8202ec2e/source: 09005aef8202ebf7 micron technology, inc., reserves the right to change products or specifications without notice. MT9D111__5_rev5.fm - rev. b 2/06 en 102 ?2004 micron technology, inc. all rights reserved. MT9D111 - 1/3.2-inch 2-megapixel soc digital image sensor jpeg indirect registers micron confidential and proprietary math co-processor operations table 22: math co-processor 7 6 5 4 function start triggers on 000x unsigned mul write to breg low byte 1 0 0 x signed mul write to breg low byte 001x unsigned mac write to breg low byte 1 0 1 x signed mac write to breg low byte 0 1 0 x unsigned idiv write to areg low byte or set trg 1 1 0 0 signed idiv write to areg low byte or set trg 1 1 0 1 signed idiv dcc write to areg low byte or set trg 011x unsigned fdiv set trg 1 1 1 0 signed fdiv set trg 1 1 1 1 signed fdiv dcc set trg www.datasheet.co.kr datasheet pdf - http://www..net/
pdf: 09005aef8202ec2e/source: 09005aef8202ebf7 micron technology, inc., reserves the right to change products or specifications without notice. MT9D111__6_rev5.fm - rev. b 2/06 en 103 ?2004 micron technology, inc. all rights reserved. MT9D111 - 1/3.2-inch 2-megapixel soc digital image sensor jpeg indirect registers micron confidential and proprietary jpeg indirect registers special function registers - gpio table 23: gpio registers register name bits register content/function addr (hex) default gpio_data_h 3:0 shows the state of gpio pads 11:8 and controls those configured as outputs. bit b (b = 0, ...,3) shows/controls the state of the pad gpio(b + 8). if certain gpio pads are floating during standby, the corresponding bits should be tied to ?0? converting the pads to output to reduce standby curr ent. see technical note tn0934 ?standby sequence? for more details. 1070 n/a gpio_data_l 7:0 shows the state of gpio pads 7:0 and controls those configured as outputs. bit b (b = 0, ...,7) shows/controls the state of the pad gpio(b). if certain gpio pads are floating during standby, the corresponding bits should be tied to ?0? converting the pads to output to reduce standby curr ent. see technical note tn0934 ?standby sequence? for more details. 1071 n/a gpio_output_toggle_h 1 3:0 writing ?1? to bit b (b = 0,...,3) toggles the gpio(b + 8) output. 1072 0 gpio_output _toggle_l 7:0 writing ?1? to bit b (b = 0,...,7) toggles the gpio(b) output. 1073 0 gpio_ output _set_h 3:0 writing ?1? to bit b sets the gpio(b + 8) output high. 1074 0 gpio_ output _set_l 7:0 writing ?1? to bit b sets the gpio(b) output high. 1075 0 gpio_ output _clear_h 3:0 writing ?1? to bit b sets the gpio(b+8) output low. 1076 0 gpio_ output _clear_l 7:0 writing ?1? to bit b sets the gpio(b) output low. 1077 0 gpio_dir_h 3:0 controls the direction of gpio pads 11:8. if bit b (b = 0,...,3) is set to ?1,? the pad gpio(b + 8) is an input; otherwise it is an output. upon power-up or reset all gpio pads become inputs. if certain gpio pads are floating during standb y, the correspond ing bits should be tied to ?0? converting the pa ds to output to reduce standby current. see technical note tn0 934 ?standby sequence? for more details. 1078 0x0f gpio_dir_l 7:0 controls the direction of gpio pads 7: 0. if bit b (b = 0,...,7) is set to ?1,? the pad gpio(b) is an input; otherwise it is an output. upon power-up or reset all gpio pads become inputs. if certain gpio pads are floating during standb y, the correspond ing bits should be tied to ?0? converting the pa ds to output to reduce standby current. see technical note tn0 934 ?standby sequence? for more details. 1079 0xff gpio_dir_reverse_h 3:0 writing ?1? to bit b (b = 0,..,3) reve rses the direction of gpio(b + 8). 107a 0 gpio_dir_reverse_l 7:0 writing ?1? to bit b (b = 0,...,7) reverses the direction of gpio(b). 107b 0 gpio_dir_in_h 3:0 writing ?1? to bit b configures the pad gpio(b + 8) as an input. 107c 0 gpio_dir_in_l 7:0 writing ?1? to bit b configures the pad gpio(b) as an input. 107d 0 gpio_dir_out_h 3:0 writing ?1? to bit b configures the pad gpio(b + 8) as an output. 107e 0 gpio_dir_out_l 7:0 writing ?1? to bit b configures the pad gpio(b) as an output. 107f 0 gpio_wg_t01 7:0 first subperiod 2 of waveform output at gpio1 (in 8-bit counter mode) or bits 15:8 of first subperiod of waveform output at gpio0 (in 16-bit counter mode). 1080 0 gpio_wg_t00 7:0 first subperiod of waveform genera ted at gpio0 (in 8-bit counter mode) or bits 7:0 of the sa me (in 16-bit counter mode). 1081 0 www.datasheet.co.kr datasheet pdf - http://www..net/
pdf: 09005aef8202ec2e/source: 09005aef8202ebf7 micron technology, inc., reserves the right to change products or specifications without notice. MT9D111__6_rev5.fm - rev. b 2/06 en 104 ?2004 micron technology, inc. all rights reserved. MT9D111 - 1/3.2-inch 2-megapixel soc digital image sensor jpeg indirect registers micron confidential and proprietary gpio_wg_t11 7:0 second subperiod of waveform outp ut at gpio1 (in 8-bit counter mode) or bits 15:8 of second subp eriod of the waveform output at gpio0 (in 16-bit counter mode). 1082 0 gpio_wg_t10 7:0 second subperiod of waveform generated at gpio0 (in 8-bit counter mode) or bits 7:0 of the same (in 16-bit counter mode). 1083 0 gpio_wg_t21 7:0 third subperiod of waveform outp ut at gpio1 (in 8-bit counter mode) or bits 15:8 of third subperiod of waveform output at gpio0 (in 16-bit counter mode). 1084 0 gpio_wg_t20 7:0 third subperiod of waveform genera ted at gpio0 (in 8-bit counter mode) or bits 7:0 of the sa me (in 16-bit counter mode). 1085 0 gpio_wg_t31 7:0 fourth subperiod of waveform output at gp io1 (in 8-bit counter mode) or bits 15:8 of fourth subperiod of waveform output at gpio0 (in 16-bit counter mode). 1086 0 gpio_wg_t30 7:0 fourth subperiod of waveform generated at gpio0 (in 8-bit counter mode) or bits 7:0 of the same (in 16-bit counter mode). 1087 0 gpio_wg_t41 7:0 fifth subperiod of waveform generated at gpio1 (in 8-bit counter mode) or bits 15:8 of 5th subperiod of waveform output at gpio0 (in 16-bit counter mode). 1088 0 gpio_wg_t40 7:0 fifth subperiod of waveform generated at gpio0 (in 8-bit counter mode) or bits 7:0 of the sa me (in 16-bit counter mode). 1089 0 gpio_wg_n1 7:0 writing to this register sets the duration of waveform generated at gpio1 (in 8-bit counter mode) or bits 15:8 of the duration of waveform generated at gpio0 (in 16-bit counter mode). finite duration is selected by writing the desired number of periods in the waveform. writing ?0?makes the duration infinite. when read, this registers returns the number of waveform periods left to be generated at gpio1 (in 8-bit counter mode) or bits 15:8 of the number remaining at gpio0 (in 16-bit counter mode). to get all 16 bits of the latter number corr ect, one must read this register before gpio_wg_n0. 108a 0 gpio_wg_n0 7:0 writing to this register sets the duration of waveform generated at gpio0 (in 8-bit counter mode) or bi ts 7:0 of the same (in 16-bit counter mode). finite duration is selected by writing the desired number of periods in the waveform. writing ?0? makes the duration infinite. when read, this register returns the number of waveform periods left to be generated at gpio0 (in 8- bit counter mode) or bits 7:0 of the same (in 16-bit counter mode). 108b 0 gpio_wg_t03 7:0 first subperiod of waveform genera ted at gpio3 (in 8-bit counter mode) or bits 15:8 of first subperiod of waveform output at gpio2 (in 16-bit counter mode). 108c 0 gpio_wg_t02 7:0 first subperiod of waveform genera ted at gpio2 (in 8-bit counter mode) or bits 7:0 of the sa me (in 16-bit counter mode). 108d 0 gpio_wg_t13 7:0 second subperiod of waveform outp ut at gpio3 (in 8-bit counter mode) or bits 15:8 of second subperiod of waveform output at gpio2 (in 16-bit counter mode). 108e 0 gpio_wg_t12 7:0 second subperiod of waveform generated at gpio2 (in 8-bit counter mode) or bits 7:0 of the same (in 16-bit counter mode). 108f 0 table 23: gpio registers (continued) register name bits register content/function addr (hex) default www.datasheet.co.kr datasheet pdf - http://www..net/
pdf: 09005aef8202ec2e/source: 09005aef8202ebf7 micron technology, inc., reserves the right to change products or specifications without notice. MT9D111__6_rev5.fm - rev. b 2/06 en 105 ?2004 micron technology, inc. all rights reserved. MT9D111 - 1/3.2-inch 2-megapixel soc digital image sensor jpeg indirect registers micron confidential and proprietary gpio_wg_t23 7:0 third subperiod of waveform genera ted at gpio3 (in 8-bit counter mode) or bits 15:8 of third subperiod of waveform output at gpio2 (in 16-bit counter mode). 1090 0 gpio_wg_t22 7:0 third subperiod of waveform genera ted at gpio2 (in 8-bit counter mode) or bits 7:0 of the sa me (in 16-bit counter mode). 1091 0 gpio_wg_t33 7:0 fourth subperiod of waveform output at gp io3 (in 8-bit counter mode) or bits 15:8 of fourth subperiod of waveform output at gpio2 (in 16-bit counter mode). 1092 0 gpio_wg_t32 7:0 fourth subperiod of waveform generated at gpio2 (in 8-bit counter mode) or bits 7:0 of the same (in 16-bit counter mode). 1093 0 gpio_wg_t43 7:0 fifth subperiod of waveform generated at gpio3 (in 8-bit counter mode) or bits 15:8 of fifth subp eriod of waveform output at gpio2 (in 16-bit counter mode). 1094 0 gpio_wg_t42 7:0 fifth subperiod of waveform generated at gpio2 (in 8-bit counter mode) or bits 7:0 of the sa me (in 16-bit counter mode). 1095 0 gpio_wg_n3 7:0 writing to this register sets the duration of waveform generated at gpio3 (in 8-bit counter mode) or bits 15:8 of the duration of waveform generated at gpio2 (in 16-bit counter mode). finite duration is selected by writing the desired number of periods in the waveform. writing ?0? makes the duration infinite. when read, this registers returns the number of waveform periods left to be generated at gpio3 (in 8-bit counter mode) or bits 15:8 of the number remaining at gpio2 (in 16-bit counter mode). to get all 16 bits of the latter number righ t, one must read this register before gpio_wg_n2. 1096 0 gpio_wg_n2 7:0 writing to this register sets the duration of waveform generated at gpio2 (in 8-bit counter mode) or bi ts 7:0 of the same (in 16-bit counter mode). finite duration is selected by writing the desired number of periods in the waveform. writing ?0? makes the duration infinite. when read, this register returns the number of waveform periods left to be generated at gpio2 (in 8- bit counter mode) or bits 7:0 of the same (in 16-bit counter mode). 1097 0 gpio_wg_t05 7:0 first subperiod of waveform genera ted at gpio5 (in 8-bit counter mode) or bits 15:8 of first subperiod of waveform output at gpio4 (in 16-bit counter mode). 1098 0 gpio_wg_t04 7:0 first subperiod of waveform genera ted at gpio4 (in 8-bit counter mode) or bits 7:0 of the sa me (in 16-bit counter mode). 1099 0 gpio_wg_t15 7:0 second subperiod of waveform outp ut at gpio5 (in 8-bit counter mode) or bits 15:8 of second subperiod of waveform output at gpio4 (in 16-bit counter mode). 109a 0 gpio_wg_t14 7:0 second subperiod of waveform generated at gpio4 (in 8-bit counter mode) or bits 7:0 of the same (in 16-bit counter mode). 109b 0 gpio_wg_t25 7:0 third subperiod of waveform outp ut at gpio5 (in 8-bit counter mode) or bits 15:8 of third subperiod of waveform output at gpio4 (in 16-bit counter mode). 109c 0 gpio_wg_t24 7:0 third subperiod of waveform genera ted at gpio4 (in 8-bit counter mode) or bits 7:0 of the sa me (in 16-bit counter mode). 109d 0 table 23: gpio registers (continued) register name bits register content/function addr (hex) default www.datasheet.co.kr datasheet pdf - http://www..net/
pdf: 09005aef8202ec2e/source: 09005aef8202ebf7 micron technology, inc., reserves the right to change products or specifications without notice. MT9D111__6_rev5.fm - rev. b 2/06 en 106 ?2004 micron technology, inc. all rights reserved. MT9D111 - 1/3.2-inch 2-megapixel soc digital image sensor jpeg indirect registers micron confidential and proprietary gpio_wg_t35 7:0 fourth subperiod of waveform output at gp io5 (in 8-bit counter mode) or bits 15:8 of fourth subperiod of waveform output at gpio4 (in 16-bit counter mode). 109e 0 gpio_wg_t34 7:0 fourth subperiod of waveform generated at gpio4 (in 8-bit counter mode) or bits 7:0 of the same (in 16-bit counter mode). 109f 0 gpio_wg_t45 7:0 fifth subperiod of waveform outp ut at gpio5 (in 8-bit counter mode) or bits 15:8 of fifth subp eriod of waveform output at gpio4 (in 16-bit counter mode). 10a0 0 gpio_wg_t44 7:0 fifth subperiod of waveform generated at gpio4 (in 8-bit counter mode) or bits 7:0 of the sa me (in 16-bit counter mode). 10a1 0 gpio_wg_n5 7:0 writing to this register sets the duration of waveform generated at gpio5 (in 8-bit counter mode) or bits 15:8 of the duration of waveform generated at gpio4 (in 16-bit counter mode). finite duration is selected by writing the desired number of periods in the waveform. writing ?0? makes the duration infinite. when read, this registers returns the number of waveform periods left to be generated at gpio5 (in 8-bit counter mode) or bits 15:8 of the number remaining at gpio4 (in 16-bit counter mode). to get all 16 bits of the latter number righ t, one must read this register before gpio_wg_n4. 10a2 0 gpio_wg_n4 7:0 writing to this register sets the duration of waveform generated at gpio4 (in 8-bit counter mode) or bi ts 7:0 of the same (in 16-bit counter mode). finite duration is selected by writing the desired number of periods in the waveform. writing ?0? makes the duration infinite. when read, this registers returns the number of waveform periods left to be generated at gpio4 (in 8- bit counter mode) or bits 7:0 of the same (in 16-bit counter mode). 10a3 0 gpio_wg_t07 7:0 first subperiod of waveform genera ted at gpio7 (in 8-bit counter mode) or bits 15:8 of first subperiod of waveform output at gpio6 (in 16-bit counter mode). 10a4 0 gpio_wg_t06 7:0 first subperiod of waveform genera ted at gpio6 (in 8-bit counter mode) or bits 7:0 of the sa me (in 16-bit counter mode). 10a5 0 gpio_wg_t17 7:0 second subperiod of waveform outp ut at gpio7 (in 8-bit counter mode) or bits 15:8 of second subperiod of waveform output at gpio6 (in 16-bit counter mode). 10a6 0 gpio_wg_t16 7:0 second subperiod of waveform generated at gpio6 (in 8-bit counter mode) or bits 7:0 of the same (in 16-bit counter mode). 10a7 0 gpio_wg_t27 7:0 third subperiod of waveform outp ut at gpio7 (in 8-bit counter mode) or bits 15:8 of third subperiod of waveform output at gpio6 (in 16-bit counter mode). 10a8 0 gpio_wg_t26 7:0 third subperiod of waveform genera ted at gpio6 (in 8-bit counter mode) or bits 7:0 of the sa me (in 16-bit counter mode). 10a9 0 gpio_wg_t37 7:0 fourth subperiod of waveform output at gp io7 (in 8-bit counter mode) or bits 15:8 of fourth subperiod of waveform output at gpio6 (in 16-bit counter mode). 10aa 0 gpio_wg_t36 7:0 fourth subperiod of waveform generated at gpio6 (in 8-bit counter mode) or bits 7:0 of the same (in 16-bit counter mode). 10ab 0 table 23: gpio registers (continued) register name bits register content/function addr (hex) default www.datasheet.co.kr datasheet pdf - http://www..net/
pdf: 09005aef8202ec2e/source: 09005aef8202ebf7 micron technology, inc., reserves the right to change products or specifications without notice. MT9D111__6_rev5.fm - rev. b 2/06 en 107 ?2004 micron technology, inc. all rights reserved. MT9D111 - 1/3.2-inch 2-megapixel soc digital image sensor jpeg indirect registers micron confidential and proprietary gpio_wg_t47 7:0 fifth subperiod of waveform generated at gpio7 (in 8-bit counter mode) or bits 15:8 of fifth subp eriod of waveform output at gpio6 (in 16-bit counter mode). 10ac 0 gpio_wg_t46 7:0 fifth subperiod of waveform generated at gpio6 (in 8-bit counter mode) or bits 7:0 of the sa me (in 16-bit counter mode). 10ad 0 gpio_wg_n7 7:0 writing to this register sets the duration of waveform generated at gpio7 (in 8-bit counter mode) or bits 15:8 of the duration of waveform generated at gpio6 (in 16-bit counter mode). finite duration is selected by writing the desired number of periods in the waveform. writing ?0? makes the duration infinite. when read, this registers returns the number of waveform periods left to be generated at gpio7 (in 8-bit counter mode) or bits 15:8 of the number remaining at gpio6 (in 16-bit counter mode). to get all 16 bits of the latter number righ t, one must read this register before gpio_wg_n6. 10ae 0 gpio_wg_n6 7:0 writing to this register sets the duration of waveform generated at gpio6 (in 8-bit counter mode) or bi ts 7:0 of the same (in 16-bit counter mode). finite duration is selected by writing the desired number of periods in the waveform. writing ?0? makes the duration infinite. when read, this register returns the number of waveform periods left to be generated at gpio6 (in 8- bit counter mode) or bits 7:0 of the same (in 16-bit counter mode). 10af 0 gpio_wg_config 3:0 setting/clearing bit b (b = 0,. ..,3) enables/disables waveform generation at the pads gp io(2b) and gpio(2b + 1). 10b0 0 7:4 clearing bit b (b = 4,. ..,7) enables the waveform generator to drive the pads gpio(2b - 8) and gpio(2b - 7) simultaneously. counters needed to generate waveforms at these pads are put in the 8-bit mode. setting bit b disconnects the waveform generator from the pad gpio(2b - 7) and allows it to generate a waveform at the pad gpio(2b - 8) using the 16-bit counter mode. 0 gpio_wg_chain 6:0 by setting bits 6:0 in this register, one can link waveforms generated at different pads into a chain. the end of the first waveform in the chain coincides with the start of the second waveform, and so on. specifically, for b = 0, 2, 4, the following is true: setting bit b forces the wave form generator to start driving gpio(b) when it is done with gpio(b + 1) (in 8-bit counter mode) or gpio(b + 2) (in 16 -bit counter mode). setting bit (b + 1) forces the wave form generator in to start driving gpio(b + 1) when done with gpio(b + 2) (in 8-bit counter mode; the bit is ignored in 16-bit mode). in addition, setting bit 6 forces the waveforms generator to start driving gpio6 when done with gp io7 (in 8-bit counter mode; the bit is ignored in 16-bit mode). 10b1 0 table 23: gpio registers (continued) register name bits register content/function addr (hex) default www.datasheet.co.kr datasheet pdf - http://www..net/
pdf: 09005aef8202ec2e/source: 09005aef8202ebf7 micron technology, inc., reserves the right to change products or specifications without notice. MT9D111__6_rev5.fm - rev. b 2/06 en 108 ?2004 micron technology, inc. all rights reserved. MT9D111 - 1/3.2-inch 2-megapixel soc digital image sensor jpeg indirect registers micron confidential and proprietary gpio_wg_clkdiv 7:0 the waveform generator has two cloc k dividers that enable it to generate waveforms at vastly differ ent paces. each divider divides the frequency of the gpio clock (typically 80 mhz) by a factor 2 d + 1 , where d is a 4-bit unsigned integer programmed into register gpio_wg_clkdiv. bits 3:0 of this register hold d for divider 1. bits 7:4 of this register hold d for divider 2. 10b2 0 gpio_wg_clkdiv_sel 7:0 cleared bit b (b = 0,?,7) tells th e waveform generator to use clock divider 1 when generating wavefo rms at the pad gpio(b). set bits select clock divider 2 fo r the corresponding pads. 10b3 0 gpio_wg_frame_sync 7:0 if bit b (b=0,?,7) in gpio_wg_fram e_sync is cleared, waveform generation at the gpio(b) output starts/resumes when bit b in gpio_wg_suspend is cleared. setting bit b in gpio_wg_frame _sync changes the conditions that must be met for waveform generation at gpio(b) can start/ resume. the clearing of bit b in gpio_wg_suspend is still necessary, but no longer sufficient . after that bit is cleared, the waveform generator restarts on each falling edge of frame_valid. 10b4 0 gpio_wg_reset 7:0 setting bit b (b = 0,?,7) stops an y ongoing waveform generation at gpio(b), and resets all counters us ed in it. the bit must be cleared before waveform generation can resume. 10b5 0 gpio_wg_suspend 7:0 setting bit b (b = 0,?, 7) suspends waveform generation at the pad gpio(b). clearing the bit restarts it. 10b6 0 gpio_ns_type 7:0 setting bit b (b = 0,?,7) enables a notification signal (ns) at the end of waveform generation at gpio(b). clearing the bit b enables a ns on next transition at gpio(b) whose sign matches the sign indicated by bit b in gpio_ns_edge_l. the pad may be configured as an ou tput or input and the transition may be caused by the waveform generator, writing to gpio_data_l or external forcing. 10b8 0 gpio_ns_edge_h 3:0 bit b (b = 0,?,3) selects the sign of transitions on pad gpio(b + 8) that triggers notification signals. setting the bit selects rising edges, clearing it, the falling edges. 10b9 0 gpio_ns_edge_l 7:0 bit b (b = 0,?,7) selects the sign of transitions on pad gpio(b) that triggers notification si gnals. setting the bit selects rising edges, clearing it, the falling edges. 10ba 0 gpio_ns_mask_h 3:0 setting bit b masks all no tification signals caus ed by events on pad gpio(b+8). masked signals do no t cause the microcontroller to wake up. clearing the bit enables waking up. 10bb 0x0f gpio_ns_mask_l 7:0 setting bit b (b = 0,?,7) masks al l notification signals caused by events on pad gpio(b). masked signals do not cause micro- controller to wake up. cleari ng the bit enables waking up. 10bc 0xff gpio_wg_strobe_sync 7:0 if bit b (b = 0,?,7) in gpio_wg_st robe_sync is cleared, waveform generation at gpio(b) output starts/resumes when bit b in gpio_wg_suspend is cleared. setting bit b in gp io_wg_strobe_sync chan ges the conditions that must be met for waveform generation on gp io(b) can start/ resume. the clearing of bit b in gpio_wg_suspend is still necessary, but no longer sufficient . after that bit is cleared, the waveform generator restarts on each rising edge of strobe. 10bd 0 table 23: gpio registers (continued) register name bits register content/function addr (hex) default www.datasheet.co.kr datasheet pdf - http://www..net/
pdf: 09005aef8202ec2e/source: 09005aef8202ebf7 micron technology, inc., reserves the right to change products or specifications without notice. MT9D111__6_rev5.fm - rev. b 2/06 en 109 ?2004 micron technology, inc. all rights reserved. MT9D111 - 1/3.2-inch 2-megapixel soc digital image sensor jpeg indirect registers micron confidential and proprietary notes: 1. registers marked by light gray shading are write-only, i.e., do not give any information on gpio status when read. 2. the term ?subperiod? refers to the time interv als labeled with t in figure 46 on page 173. the gpio generates periodic waveforms like those shown there. one period of a wave- form consists of 1 to 5 nonzero subperiods . the gpio_wg_t* registers actually hold counter settings that have to be converted to time units to obtain true length of the sub- periods. please see ?wavefor m programming? on page 163 for a more complete explana- tion. gpio_ns_status_h 3:0 when bit b (b = 0,?,3) is set, it signals that some event on pad gpio(b+8) caused a noti fication signal. writin g ?1? to the bit to clears it. 10be 0 gpio_ns_status_l 7:0 when bit b (b = 0,?,7) is set, it signals that some event on pad gpio(b) caused a notifica tion signal. writing ?1 ? to the bit to clears it. 10bf 0 table 23: gpio registers (continued) register name bits register content/function addr (hex) default www.datasheet.co.kr datasheet pdf - http://www..net/
pdf: 09005aef8202ec2e/source: 09005aef8202ebf7 micron technology, inc., reserves the right to change products or specifications without notice. MT9D111__6_rev5.fm - rev. b 2/06 en 110 ?2004 micron technology, inc. all rights reserved. MT9D111 - 1/3.2-inch 2-megapixel soc digital image sensor output format and timing micron confidential and proprietary output format and timing yuv/rgb uncompressed output uncompressed yuv or rgb data can be output either directly from the output format- ting block or via a fifo buffer with a capacity of 1,600 bytes, enough to hold one half uncompressed line at full resolution. buffering of data is a way to equalize the data out- put rate when image decimati on is used. decimation prod uces an intermittent data stream consisting of short hi gh-rate bursts separated by idle periods. figure 6 depicts such a stream. high pixel clock frequency during bursts may be undesirable due to emi concerns. figure 6: timing of decimated un compressed output bypassing the fifo figure 7 depicts the output timing of unco mpressed yuv/rgb when a decimated data stream is equalized by buffering or when no decimation takes place. the pixel clock fre- quency remains constant during each line _valid high period. decimated data are output at a lower frequenc y than full size frames, which helps to reduce emi. figure 7: timing of unco mpressed full frame output or decimated output passing through the fifo timing details of uncompressed yuv/rgb output are shown in figure 8 on page 111. frame_valid line_valid pix c lk line_valid d out bt. 6 01 c o d e pixel data pixel data bt. 6 01 c o d e frame_valid line_valid pix c lk d out [7:0] www.datasheet.co.kr datasheet pdf - http://www..net/
pdf: 09005aef8202ec2e/source: 09005aef8202ebf7 micron technology, inc., reserves the right to change products or specifications without notice. MT9D111__6_rev5.fm - rev. b 2/06 en 111 ?2004 micron technology, inc. all rights reserved. MT9D111 - 1/3.2-inch 2-megapixel soc digital image sensor output format and timing micron confidential and proprietary figure 8: details of uncom pressed yuv/rgb output timing uncompressed yuv/rgb data ordering the MT9D111 supports swapping ycrcb mode, as illustrated in table 24. the rgb output data ordering in default mode is shown in table 25. the odd and even bytes are swapped when luma/chroma swap is enabled. r and b channels are bit-wise swapped when chroma swap is enabled. symbol definition conditions min max units f pixclk pixclk frequency default 80 mhz t pd pixclk to data valid default -3 3 ns t pfh pixclk to fv high default -3 3 ns t plh pixclk to lv high default -3 3 ns t pfl pixclk to fv low default -3 3 ns t pll pixclk to lv low default -3 3 ns table 24: ycrcb output data ordering mode default (no swap) cb i y i cr i y i+1 swapped crcb cr i y i cb i y i+1 swapped yc y i cb i y i+1 cr i swapped crcb, yc y i cr i y i+1 cb i table 25: rgb ordering in default mode mode (swap disabled) byte d 7 d 6 d 5 d 4 d 3 d 2 d 1 d 0 rgb 565 odd r 7 r 6 r 5 r 4 r 3 g 7 g 6 g 5 even g 4 g 3 g 2 b 7 b 6 b 5 b 4 b 3 rgb 555 odd 0 r 7 r 6 r 5 r 4 r 3 g 7 g 6 even g 4 g 3 g 2 b 7 b 6 b 5 b 4 b 3 rgb 444x odd r 7 r 6 r 5 r 4 g 7 g 6 g 5 g 4 even b 7 b 6 b 5 b 4 0 0 0 0 rgb x444 odd 0 0 0 0 r 7 r6 6 r 5 r 4 even g 7 g 6 g 5 g 4 b 7 b 6 b 5 b 4 pix c lk data[7:0] frame vali d / line vali d xxx xxx xxx xxx xxx xxx note: frame_vali d lea d s line_vali d b y 6 pix c lks. note: frame_vali d trails line_vali d b y 6 pix c lks. t pfl t pll t pd t pd t pfh t plh pxl_0 pxl_1 pxl_2 pxl_n www.datasheet.co.kr datasheet pdf - http://www..net/
pdf: 09005aef8202ec2e/source: 09005aef8202ebf7 micron technology, inc., reserves the right to change products or specifications without notice. MT9D111__6_rev5.fm - rev. b 2/06 en 112 ?2004 micron technology, inc. all rights reserved. MT9D111 - 1/3.2-inch 2-megapixel soc digital image sensor output format and timing micron confidential and proprietary uncompressed 10-bit bypass output raw 10-bit bayer data from the sensor core ca n be output in bypass mode in two ways: 1. using 10 data output pads (d out 0?d out 9), or 2. using only 8 pads (d out 0?d out 7) and a special 8 + 2 data format, shown in table 26. the timing of 10-bit or 8-bit data stream ou tput in the bypass mode is qualitatively the same as that depicted in figure 7. figure 9: example of timing for non- decimated uncompresse d output bypassing output fifo jpeg compressed output jpeg compression of if p output produces a data stream whose structure differs from that of an uncompressed yuv/rgb stream. fr ames are no longer sequences of lines of constant length. this differenc e is reflected in the timing of the line_valid signal. when jpeg compression is enabled, logical highs on line_valid do not correspond to image lines, but to vari ably sized packets of valid data. in other words, the line_valid signal is in fact a data_valid signal. it is a good analogy to compare the jpeg output of the MT9D111 to an 8-bit para llel data port wherein the line_valid sig- nal indicates valid data and the frame_valid signal indicates frame timing. the jpeg compressed data can be output eith er continuously or in blocks simulating image lines. the latter output scheme is intended to spoof a standard video pixel port connected to the MT9D111 and for that purpose treats jpeg entropy-coded segments as if they were standard video pixels. in the continuous output mode, jpeg output clock can be free running or gated. in all, three timing modes are available and are depicted in figure 10 on page 114, figure 11 on page 114, and figure 12 on page 114. these timing diagrams are merely three typical examples of many variations of jpeg output. descrip- tion of output configuration register r13:2 in table 7, "ifp registers, page 2," on page 52 provides more information on different output interface co nfiguration options. table 26: 2-byte rgb format odd bytes 8 data bits d 9 d 8 d 7 d 6 d 5 d 4 d 3 d 2 even bytes 2 data bits + 6 unused bits 0 0 0 0 0 0 d 1 d 0 0xff 0x00 0x00 0xab 0xff 0x00 0x00 0x80 cb 0 y 0 c r 0 y 1 cb 0 y 0 c r 0 y 1 0xff 0x00 0x00 0x9d 0xff 0x00 0x00 0xb 6 www.datasheet.co.kr datasheet pdf - http://www..net/
pdf: 09005aef8202ec2e/source: 09005aef8202ebf7 micron technology, inc., reserves the right to change products or specifications without notice. MT9D111__6_rev5.fm - rev. b 2/06 en 113 ?2004 micron technology, inc. all rights reserved. MT9D111 - 1/3.2-inch 2-megapixel soc digital image sensor output format and timing micron confidential and proprietary the "continuous" and spoof jpeg output mo des differ primarily in how the line_valid output is asserted. in the continuous mode, line_valid is asserted only during output clock cycles containing valid jpeg data. the resulting line_valid signal pattern is non- uniform and highly image dependent, reflec ting the inherent nature of jpeg data stream. in the spoof mode, line_valid is as serted and de-asserted in a more uniform pattern emulating uncompressed video output with horizontal blanking intervals. when line_valid is de-asserted, available jpeg da ta are not output, but instead remain in the fifo until line_valid is asserted agai n. during the time when line_valid is asserted, the output clock is gated off whenever there is no valid jpeg data in the fifo. note: as a result, spoof ?lines? containing the sa me number of valid data bytes may be out- put within different time intervals dependin g on constantly varying jpeg data rate. the host processor configures the spoof pa ttern by programming the total number of line_valid assertion intervals, as well as the number of output clock periods during and between line_valid assertions. in othe r words, the host processor can define a temporal ?frame? for jpeg output, preferably with ?size? tailored to the expected jpeg file size. if this frame is too large for the to tal number of jpeg bytes actually produced, the MT9D111 either de-asserts frame_valid or continues to pad unused ?lines? with zeros until the end of the frame. if the frame is too small, the MT9D111 either continues to output the excess jpeg bytes until the enti re jpeg compressed image is output or dis- cards the excess jpeg bytes and sets an error flag in a status register accessible to the host processor. in the continuous output mode, the jpeg outp ut clock can be configured to be either gated off or running while line_valid is de-asserted. to save extra power, the jpeg out- put clock can also be gated off between fram es (when frame_valid is de-asserted) in both continuous and spoof ou tput mode. in the continuous output mode, there is an option to insert jpeg soi (0xffd8) and eo i (0xffd9) markers respectively before and after valid jpeg data. soi and eoi can be inserted either inside or outside the frame_valid assertion period, but always outside line_valid assertions. the output order of even and odd bytes of jp eg data can be swapped in the spoof output mode. this option is not supp orted in the continuous mode. output clock speed can optionally be made to vary according to the fullness of the fifo, to reduce the likelihood of fifo overflow. wh en this option is enabled, the output clock switches at three fixed levels of fifo fullness (25 percent, 50 percent and 75 percent) to a higher or lower frequency, depending on the direction of fullness change. the set of pos- sible output clock frequencies is restricted by the fact that its period must be an integer multiple of the master clock period. the frequencies to be used are chosen by program- ming three output clock frequency divisors in registers r14:2 and r15:2. divisor n1 is used if the fifo is less than 50 percent full and last fullness threshold crossed has been 25 percent. when the fifo reaches 50 percent and 75 percent fullness, the output clock switches to divisor n2 and n3, respectively. when the fifo fullness level drops to 50 per- cent and 25 percent, the output clock is switched back to divisor n2 and n1, respectively. the host processor can read registers containing jpeg status flags and jpeg data length (total byte count of valid jpeg data) via a two- wire serial interface. in addition, the jpeg data length and jpeg status byte are always appended at the end of jpeg spoof frame. jpeg status byte can be optionally appended at the end of jpeg continuous frame. jpeg data stream sent to the host does not have a header. www.datasheet.co.kr datasheet pdf - http://www..net/
pdf: 09005aef8202ec2e/source: 09005aef8202ebf7 micron technology, inc., reserves the right to change products or specifications without notice. MT9D111__6_rev5.fm - rev. b 2/06 en 114 ?2004 micron technology, inc. all rights reserved. MT9D111 - 1/3.2-inch 2-megapixel soc digital image sensor output format and timing micron confidential and proprietary figure 10: timing of jpeg compress ed output in free-running clock mode figure 11: timing of jpeg comp ressed output in gated clock mode figure 12: timing of jpeg co mpressed output in spoof mode in the spoof mode, the timing of frame_ valid and line_valid mimics an uncom- pressed output. the timing of pixclk and d out within each line_valid assertion period is variable and therefore unlike that of uncompressed data. valid jpeg data are padded with dummy data to the size of the original uncompressed frame. pix c lk frame_valid line_valid d out 0-d out 7 first jpe g byte last jpe g byte s tatus byte pix c lk frame_valid line_valid d out 0-d out 7 s oi first jpe g byte last jpe g byte eoi frame_valid line_valid line_valid pix c lk d out 0-d out 7 j0 = jpe g _ d ata_len g th [7:0] j1 = jpe g _ d ata_len g th [15:8] j2 = jpe g _ d ata_len g th [23:1 6 ] s = s tatus b yte pa dd e d data j0 j1 j2 s www.datasheet.co.kr datasheet pdf - http://www..net/
pdf: 09005aef8202ec2e/source: 09005aef8202ebf7 micron technology, inc., reserves the right to change products or specifications without notice. MT9D111__6_rev5.fm - rev. b 2/06 en 115 ?2004 micron technology, inc. all rights reserved. MT9D111 - 1/3.2-inch 2-megapixel soc digital image sensor output format and timing micron confidential and proprietary color conversion formulas y'cb'cr' itu-r bt.601 a widely known color conversion standard. note that 16 < y 601 < 235 and 16 < cb, cr < 240. 0 < = rgb < = 255. y 601 ' = y'*219/256 + 16 cr' = 0.713 (r' - y')*224/256 + 128 cb' = 0.564 (b' - y')*224/256 + 128 where y' = 0.299 r' + 0.587 g' + 0.114 b' the reverse formulas to convert ycbcr into rgb, 0 < = rgb < = 255: r' = 1.164(y 601 ' - 16) + 1.596(cr' - 128) g' = 1.164(y 601 ' - 16) - 0.813(cr' - 128) - 0.391(cb' - 128) b' = 1.164(y 601 ' - 16) + 2.018(cb' - 128) y'u'v' this conversion is bt 601 scaled to make yuv range from 0 through 255. this setting is recommended for jpeg encoding and is the most popular, although it is not well defined and often misused in windows. y' = 0.299 r' + 0.587 g' + 0.114 b' u' = 0.564 (b' - y') + 128 v' = 0.713 (r' - y') + 128 there is an option where 128 is not added to u'v'. y'cb'cr using srgb formulas the MT9D111 implements the srgb standard. this option provides ycbcr coefficients for a correct 4:2:2 transmission. note that 16 < y60 1< 235, 16 < cb, cr < 240 and 0 < = rgb < = 255. y' = (0.2126*r' + 0.7152*g' + 0.0722*b')*219/256 + 16 cb' = 0.5389*(b '- y')*224/256 + 128 cr' = 0.635*(r' - y')*224/256 + 128 y'u'v' using srgb formulas similar to the previous set of formulas, bu t has yuv spanning a range of 0 through 255. y' = 0.2126*r' + 0.7152*g' + 0.0722*b' u' = 0.5389*(b' - y') + 128 = -0.1146*r - 0.3854*g + 0.5*b v' = 0.635*(r' - y') + 128 = 0.5*r - 0.4542*g - 0.0458*b there is an option to disable adding 128 to u'v'. the reverse transform is as follows: r' = y + 1.5748*v g' = y - 0.1873*(u - 128) - 0.4681*(v - 128) b' = y + 1.8556*(u - 128) www.datasheet.co.kr datasheet pdf - http://www..net/
pdf: 09005aef8202ec2e/source: 09005aef8202ebf7 micron technology, inc., reserves the right to change products or specifications without notice. MT9D111__6_rev5.fm - rev. b 2/06 en 116 ?2004 micron technology, inc. all rights reserved. MT9D111 - 1/3.2-inch 2-megapixel soc digital image sensor sensor core micron confidential and proprietary sensor core this section describes the sensor core. the core is based entirely on micron?s mt9d011 sensor. the soc firmware controls a key sensor core registers, such as exposure, window size, gains, and contexts. when firmware or mcu are disabled, the sensor core can be pro- grammed directly. introduction the sensor core is a progressive-scan sensor that gene rates a stream of pixel data quali- fied by line_valid and frame_valid signals. an on-chip pll generates the master clock from an input clock of 6 mhz to 40 mhz. in default mode, the data rate (pixel clock) is the same as the master clock freq uency, which means that one pixel is gener- ated every master clock cycle. the sensor block diagram is shown in figure 13. figure 13: sensor core block diagram the core of the sensor is an active-pixel array. the timing and control circuitry sequences through the rows of the array, resetti ng and then reading each row. in the time interval between resetting a row and reading th at row, the pixels in that row integrate incident light. the exposure is controlled by varying the time interval between reset and readout. after a row is read, the data from the columns is sequenced through an analog signal chain (providing offset correction an d gain), and then through an adc. the out- put from the adc is a 10-bit value for each pi xel in the array. the pixel array contains optically active and light-shielded ?black? pixels. the black pixels are used to provide data for on-chip offset correction algorithms (black level control). the sensor contains a set of 16-bit control an d status registers that can be used to con- trol many aspects of the sensor operations. these registers can be accessed through a two-wire serial interface. in this document, registers are specified either by name (col- umn start) or by register address (r0x04:0). fiel ds within a register are specified by bit or by bit range (r0x20:0[0] or r0x0b:0[13 : 0]). the control and status registers are described in table 5, "sensor register description," on page 29. the output from the sensor is a bayer pattern : alternate rows are a sequence of either green/red pixels or blue/green pixels. the offset and gain stages of the analog signal chain provide per-color control of the pixel data. active-pixel sensor (aps) array uxga 1600h x 1200v serial i/o data out sync signals control register analog processing adc timing and control www.datasheet.co.kr datasheet pdf - http://www..net/
pdf: 09005aef8202ec2e/source: 09005aef8202ebf7 micron technology, inc., reserves the right to change products or specifications without notice. MT9D111__6_rev5.fm - rev. b 2/06 en 117 ?2004 micron technology, inc. all rights reserved. MT9D111 - 1/3.2-inch 2-megapixel soc digital image sensor sensor core micron confidential and proprietary pixel array structure the sensor core pixel array is configured as 1,688 columns by 1,256 rows (shown in figure 14). the first 52 columns and the first an d the last 20 rows of pixels are optically black and are used for the automatic black le vel adjustment. the last 4 columns are also optically black. the optically active pixels are used as follows: in default mode a uxga image (1,600 col- umns by 1,200 rows) is generated, starting at row 28, column 60. a 4-pixel boundary of active pixels can be enabled around the image to avoid boundary effects during color interpolation and correction. during mirrored readout, the region of active pixels used to generate the image is offset by 1 pixel in each mirrored direction so that the readout always starts on the same color pixel. figure 14: pixel array the sensor core uses a bayer color pattern, as shown in figure 15. the even-numbered rows contain green and red color pixels; odd-numbered rows contain blue and green color pixels. even-numbered columns contai n green and blue color pixels; odd-num- bered columns contain red and green color pixels. the color order is preserved during mirrored readout. figure 15: pixel color pattern detail (top right corner) (1687, 1255) 52 black columns 20 black rows 20 black rows (0,0) 4 black columns oversize uxga 1,632 x 1,216 active pixels black pixels column readout direction . . . ... row readout direction g1 b g1 b g1 b r g2 r g2 r g2 g1 b g1 b g1 b r g2 r g2 r g2 g1 b g1 b g1 b r g2 r g2 r g2 g1 b g1 b g1 b first clea r pixel (52,20) www.datasheet.co.kr datasheet pdf - http://www..net/
pdf: 09005aef8202ec2e/source: 09005aef8202ebf7 micron technology, inc., reserves the right to change products or specifications without notice. MT9D111__6_rev5.fm - rev. b 2/06 en 118 ?2004 micron technology, inc. all rights reserved. MT9D111 - 1/3.2-inch 2-megapixel soc digital image sensor sensor core micron confidential and proprietary default readout order by convention, the sensor core pixel array is shown with pixel (0,0) in the top right-hand corner (see figure 15). this reflects the actu al layout of the array on the die. when the sensor is imaging, the active surface of the sensor faces the scene as shown in figure 16. when the image is read out of the sensor, it is read one row at a time, with the rows and columns sequenced as shown in figure 14. by convention, data from the sensor is shown with the first pixel read out?pixel (52,20) in the case of the sensor core?in the top left- hand corner. figure 16: im aging a scene raw data format the sensor core image data is read out in a progressive scan. valid image data is sur- rounded by horizontal blanking and vertic al blanking as shown in figure 17. the amount of horizontal blanking and vertical blanking is programmable. line_valid is high during the shaded region of the figu re. frame_valid timing is described in the next section. figure 17: spatial illus tration of image readout lens pixel (0,0) row readout order column readout order scene sensor (rear view) p 0,0 p 0,1 p 0,2 ................................p 0,n-1 p 0,n p 1,0 p 1,1 p 1,2 ................................p 1,n-1 p 1,n 00 00 00 ............. 00 00 00 00 00 00 ............. 00 00 00 p m-1,0 p m-1,1 .........................p m-1,n-1 p m-1,n p m,0 p m,1 .........................p m,n-1 p m,n 00 00 00 ............. 00 00 00 00 00 00 ............. 00 00 00 00 00 00 ............. 00 00 00 00 00 00 ............. 00 00 00 00 00 00 ............. 00 00 00 00 00 00 ............. 00 00 00 00 00 00 ..................................... 00 00 00 00 00 00 ..................................... 00 00 00 00 00 00 ................................ 00 00 00 00 00 00 ................................ 00 00 00 valid ima g e horizontal blankin g verti c al blankin g verti c al/horizontal blankin g www.datasheet.co.kr datasheet pdf - http://www..net/
pdf: 09005aef8202ec2e/source: 09005aef8202ebf7 micron technology, inc., reserves the right to change products or specifications without notice. MT9D111__6_rev5.fm - rev. b 2/06 en 119 ?2004 micron technology, inc. all rights reserved. MT9D111 - 1/3.2-inch 2-megapixel soc digital image sensor sensor core micron confidential and proprietary raw data timing the sensor core output data is synchronized with the pixclk output. when line_valid is high, one pixel da tum is output on the 10-bit d out output every pix- clk period. by default, the pixclk signal runs at the same frequency as the master clock, and its rising edges occur one-half of a master clock period after transitions on line_valid, frame_valid, and d out (see figure 18). this allows pixclk to be used as a clock to sample the data. pixclk is contin uously enabled, even during the blanking period. the sensor core can be programmed to delay the pixclk edge relative to the d out transitions from 0 to 3.5 master clocks, in steps of one-half of a master clock. this can be achieved by programming the corresponding bits in r0x0a:0. the parameters p, a, and q in figure 19 are defined in table 27 on page 120. figure 18: pixel data timing example figure 19: row timing and frame_valid/line_valid signals the sensor timing is shown in terms of pixel clock and master clock cycles (see figure 18 on page 119). the recommended master clock frequency is 36 mhz. increasing the inte- gration time to more than one frame causes the frame time to be extended. the equa- tions in table assume integration time is less than the number of rows in a frame (r0x09:0 < r0x03:0/s + border + vblank_reg). if this is not the case, the number of integration rows must be used instead to determine the frame time, as shown in tabl e 28 . p 0 (9:0) p 1 (9:0) p 2 (9:0) p 3 (9:0) p 4 (9:0) p n-1 (9:0) p n (9:0) valid image data blanking blanking line_valid pixclk d out 0-d out 9 frame_valid line_valid num b er of master c lo c ks paq aqap www.datasheet.co.kr datasheet pdf - http://www..net/
pdf: 09005aef8202ec2e/source: 09005aef8202ebf7 micron technology, inc., reserves the right to change products or specifications without notice. MT9D111__6_rev5.fm - rev. b 2/06 en 120 ?2004 micron technology, inc. all rights reserved. MT9D111 - 1/3.2-inch 2-megapixel soc digital image sensor sensor core micron confidential and proprietary note: skip factor should be multipli ed by 2 if binning is enabled. table 27: frame time parameter name equation default timing at 36 mhz dual adc mode hblank_reg horizontal blanking register r0x07:0 if r0xf2:0[0] = 0 r0x05:0 if r0xf2:0[0] = 1 0x15c = 348 pixels vblank_reg vertical blanking register r0x8:0 if r0xf2:0[1] = 0 r0x6:0 if r0xf2:0[1] = 1 0x20 = 32 rows adc_mode adc mode r0xf2:0[3] = 0: r0x20:0[10] r0xf2:0[3] = 1: r0x21:0[10] pixclk_period pixel clock period adc_mode = 0: r0x0a:0[2:0] adc_mode = 1: r0x0a:0[2:0]*2 1 adc_mode: 55.556ns 2 adc_mode: 27.778ns s skip factor for skip 2x mode: s = 2 for skip 4x mode: s = 4 for skip 8x mode: s = 8 for skip 16x mode: s = 16 otherwise, s = 1 1 aactive data time (r0x04:0/s) * pixclk_ period 1,600 pixel clocks = 1,600 master = 44.44s p frame start/end blanking 6 * pixclk_period (can be controlled by r0x1f:0) 6 pixel clocks = 12 master = 0.166s q horizontal blanking hblank_reg * pixclk_period 348 pixel clocks = 348 master = 9.667s a + q rowtime ((r0x04:0/s) + hbl ank_reg) * pixclk_period 1,948 pixel clocks = 1,948 master = 54.112s v vertical blanking vblank_reg * (a + q) + (q - 2*p) 62,672 pixel clocks = 62,672 master = 1.741ms nrows * (a + q) frame valid time (r0x03:0/s) * (a + q) - (q - 2*p) 2,337,264 pixel clocks = 2,337,264 master = 64.925ms f total frame time ((r0x03:0/s) + vblank_reg) * (a + q) 2,399,936 pixel clocks = 2,399,936 master = 66.665ms table 28: frame ? long integration time parameter name equation (master clock) v? vertical blanking (long integration time) (r0x09:0 ? (r0x03:0)/s) * (a + q) + (q - 2*p) f? total frame time (long integration time) (r0x09:0) * (a + q) www.datasheet.co.kr datasheet pdf - http://www..net/
pdf: 09005aef8202ec2e/source: 09005aef8202ebf7 micron technology, inc., reserves the right to change products or specifications without notice. MT9D111__6_rev5.fm - rev. b 2/06 en 121 ?2004 micron technology, inc. all rights reserved. MT9D111 - 1/3.2-inch 2-megapixel soc digital image sensor sensor core micron confidential and proprietary registers table 5, "sensor register description," on page 29 provides a detailed description of the registers. bit fields that are not identified in the table are read only. double-buffered registers some sensor settings cannot be changed duri ng frame readout. for example, changing row width r0x03:0 part way through frame re adout results in inconsistent line_valid behavior. to avoid this, the sensor core double buffers many registers by implementing a ?pending? and a ?live? version. reads and writes access the pending register. the live register controls the sensor operation. the value in the pending register is transferre d to a live register at a fixed point in the frame timing, called ?frame start.? frame star t is defined as the point at which the first dark row is read out. by default, this occurs 10 row times before frame_valid goes high. r0x22:0 enables the dark rows to be show n in the image, but this has no effect on the position of frame start. to determine which registers or register fi elds are double-buffered in this way, see table 5, "sensor register description," on page 29, the ?sync?d-to-frame-start? column. r0x0d:0[15] can be used to inhibit transfers from the pending to the live registers. this control bit should be used when making many register changes that must take effect simultaneously. bad frames a bad frame is a frame where all rows do no t have the same integration time, or where offsets to the pixel values changed during the frame. many changes to the sensor register settings can cause a bad frame. for example, when row width r0x03:0 is changed, the new regist er value does not affect sensor behavior until the next frame start. however, the frame that would be read out at that frame-start has been integrated using the old row width. consequently, reading it out using the new row width results in a frame with an incorrect integration time. by default, most bad frames are masked: line_valid and frame_valid are inhibited for these frames so that the vertical blanking time between frames is extended by the frame time. to determine which register or register field changes can produce a bad frame, see table 5, "sensor register description," on page 29, the ?bad frame? column, and these notations: ? n?no. changing the register value does not produce a bad frame ? y?yes. changing the register value might produce a bad frame ? ym?yes; but the bad frame is masked out unless the ?show bad frames? feature (r0x0d:0[8]) is enabled changes to integration time if the integration time (r0x09:0) is change d while frame_valid is asserted for frame n ; the first frame output using the new integration time is frame ( n + 2 ). the sequence is as follows: 1. during frame n , the new integration time is held in the r0x09:0 pending register. 2. at the start of frame ( n +1 ), the new integration time is transferred to the r0x09:0 live register. www.datasheet.co.kr datasheet pdf - http://www..net/
pdf: 09005aef8202ec2e/source: 09005aef8202ebf7 micron technology, inc., reserves the right to change products or specifications without notice. MT9D111__6_rev5.fm - rev. b 2/06 en 122 ?2004 micron technology, inc. all rights reserved. MT9D111 - 1/3.2-inch 2-megapixel soc digital image sensor sensor core micron confidential and proprietary integration for each row of frame ( n + 1 ) has been completed using the old integration time. the earliest time that a row can start integrating using the new integration time is immediately after that row has been read for frame ( n + 1 ). the actual time that rows start integrating using the new integration time is dependent on the new value of the integration time. 3. when frame ( n + 1 ) is read out, it is integrated using the new integration time. if the integration time is changed (r0x09:0 written) on successive frames, each value written is applied to a single frame; the la tency between writing a value and it affecting the frame readout remains at two frames. changes to gain settings when the gain settings (r0x2b:0, r0x2c:0, r0x2d:0, r0x2e:0, and r0x2f:0) are changed, the gain is usually updated on the next fram e start. when the integration time and the gain are changed simultaneously, the gain upda te is held off by one frame so that the first frame output with the new integration ti me also has the new gain applied. all the firmware drivers must be off (i.e. seq.cmd=0) before manual control of gains or integra- tion time (r0x09:0) is possible. www.datasheet.co.kr datasheet pdf - http://www..net/
pdf: 09005aef8202ec2e/source: 09005aef8202ebf7 micron technology, inc., reserves the right to change products or specifications without notice. MT9D111__6_rev5.fm - rev. b 2/06 en 123 ?2004 micron technology, inc. all rights reserved. MT9D111 - 1/3.2-inch 2-megapixel soc digital image sensor feature description micron confidential and proprietary feature description pll generated master clock the pll embedded in the sensor core can generate a master clock signal whose fre- quency is up to 80 mhz (input clock from 6 mhz through 64 mhz). registers r0x66:0 and r0x67:0 control the frequency of the pll-ge nerated clock. it is po ssible to bypass the pll and use clkin as master clock. in order to do so, one must set r0x65:0[15] to 1. if power consumption is a concern, r0x65:0[14] shou ld be also set to 1 a short time later, to put the bypassed pll in power down mode. to enable the pll again, the two bits must be set to 0 in the reverse order. by default, the pll is bypassed and powered down. pll setup the pll output frequency is determined by three constants (m, n, and p) and the input clock frequency. these three values are set in: r102:0// [15:8] for m; [5:0] for n r103:0// [6:0] for p their relations can be shown by the following equation: f pll , f out = f pll , f in , x m / [2 x (n+1) x (p+1)] however, since the following requirements must be satisfied, then not all combinations of m/n/p are valid: m must be 16 or higher f pfd , f vco , f out ranges are satisfied after determining the proper m, n, and p values and setting them in r102:0/r103:0, the pll can be enabled by the following sequence: r101:0[14] = 0// powers on pll r101:0[15] = 0// disable pll bypass (enabling pll) note: if pll is used, bypass the pll (r101:0[15]=1) be fore going into hard standby. it can be enabled again (r101:0[15]=0) once the sensor is out of standby. pll power-up the pll takes time to power up. during this ti me, the behavior of its output clock signal is not guaranteed. the pll is in the power down mode by default and must be turned on manually. when using the pll, the correct power-up sequence after chip reset is as fol- lows: 1. program pll frequency settings (r0x66:0 and r0x67:0) 2. power up the pll (r0x65:0[14] = 0) 3. wait for a time longer than pll locking time (> 1ms) 4. turn off the pll bypass (r0x65:0[15] = 0) table 29: frequency parameters frequency equation min (mhz) max (mhz) f pfd f in / (n+1) 2 13 f vco f pfd x m 110 240 f out f vco / [2 x (p+1)] 6 80 f in ?664 www.datasheet.co.kr datasheet pdf - http://www..net/
pdf: 09005aef8202ec2e/source: 09005aef8202ebf7 micron technology, inc., reserves the right to change products or specifications without notice. MT9D111__6_rev5.fm - rev. b 2/06 en 124 ?2004 micron technology, inc. all rights reserved. MT9D111 - 1/3.2-inch 2-megapixel soc digital image sensor feature description micron confidential and proprietary window control window start the row and column start address of the displayed image can be set by r0x01:0 (row start) and r0x02:0 (column start). window size the size of the sensor core image is contro lled by r0x03:1 (row width) and r0x04:0 (col- umn width). the default image size is 1,600 columns and 1,200 rows (uxga). the window start and size registers can be used to change the number of columns in the image from 17 through 1,632 and the number of rows from 2 through 1,216. the dis- played image size is controlled by the output and crop variables in the mode (id=7) driver. pixel border when bits r0x20:0[9:8] are both set, a 4-pi xel border is added around the specified image. this border can be used as extra pixels for image processing algorithms. the bor- der is independent of the readout mode, which means that even in skip, zoom, and bin- ning modes, a 4-pixel border is output in the image. when enabled, the row and column widths are 8 pixels larger than the values programmed in r0x03:0 and r0x04:0. if the border is enabled but not shown in the image (r32[9:8] = 01), the horizontal blanking and vertical blanking values are 8 pixels la rger than the values programmed in the blank- ing registers. readout modes readout speeds and power savings the sensor core has two adcs to convert th e pixel values to digital data. because the adcs run at half the master clock frequency, it is possible to achieve a data rate equal to the master clock frequency. by turning off one of the adcs, the power consumption of the sensor is reduced. the pixel clock is then reduced by a factor of two. in r0x20:0 or r0x21:0, bit 10 chooses between the two modes: ? 0: use both adcs and read out at the set pixel clock frequency (r0x0a:0[3:0]) ? 1: use 1 adc and read out at half the set pixel clock freq uency (r0x0a:0[3:0]) this can be used, for instance, when the came ra is in preview mode. to make the transi- tions between two sensor settings easier, some simple context switching is described in ?context switching? on page 129. column mirror image by setting r0x20:0[1] = 1 (r0x21:0 in context a), the readout order of the columns are reversed as shown in figure 20. the starting color is preserved when mirroring the col- umns. row mirror image by setting r0x20:0[0] = 1 (r0x21:0 in context a), the readout order of the rows are reversed as shown in figure 21. the starting color is preserved when mirroring the rows. www.datasheet.co.kr datasheet pdf - http://www..net/
pdf: 09005aef8202ec2e/source: 09005aef8202ebf7 micron technology, inc., reserves the right to change products or specifications without notice. MT9D111__6_rev5.fm - rev. b 2/06 en 125 ?2004 micron technology, inc. all rights reserved. MT9D111 - 1/3.2-inch 2-megapixel soc digital image sensor feature description micron confidential and proprietary figure 20: 6 pixels in normal and column mirror readout modes figure 21: 6 rows in normal and row mirror readout modes column and row skip this section assumes context b. if context a is used, replace all references to r0x20:0 with r0x21:0. by setting r0x20:0[4] = 1 or r0x20:0[7] = 1, skip is enabled for rows or columns, respec- tively. when skip is enabled, the image is su bsampled. the amount of skipping is set by r0x20:0[3:2] (rows) and r0x20:0[6:5] (columns) according to table 30. depending on the skip value, the output size variable in th e mode (id=7) driver might need adjustments. the number of rows or columns read out is what is set in r0x03:0 or r0x04:0, respec- tively, divided by the skip value in this table. in all cases, the row and column sequencing ensures that the bayer pattern is preserved. column skip examples are shown in figures 22 through 26. table 30: skip values bit values skip value 00 2 01 4 10 8 11 16 d out 0?d out 9 line_valid normal readout g0 (9:0) r0 (9:0) g1 (9:0) r1 (9:0) g2 (9:0) r2 (9:0) d out 0?d out 9 reverse readout r2 (9:0) g3 (9:0) g2 (9:0) r1 (9:0) g1 (9:0) r0 (9:0) d out 0?d out 9 frame_valid normal readout row0 (9:0) row1 (9:0) row2 (9:0) row3 (9:0) row4 (9:0) row5 (9:0) d out 0?d out 9 reverse readout row5 (9:0) row6 (9:0) row4 (9:0) row3 (9:0) row2 (9:0) row1 (9:0) www.datasheet.co.kr datasheet pdf - http://www..net/
pdf: 09005aef8202ec2e/source: 09005aef8202ebf7 micron technology, inc., reserves the right to change products or specifications without notice. MT9D111__6_rev5.fm - rev. b 2/06 en 126 ?2004 micron technology, inc. all rights reserved. MT9D111 - 1/3.2-inch 2-megapixel soc digital image sensor feature description micron confidential and proprietary figure 22: 8 pixels in normal an d column skip 2x readout modes figure 23: 16 pixels in normal and column skip 4x readout modes figure 24: 32 pixels in normal and column skip 8x readout modes d out 0?d out 9 line_valid normal rea d out g 0 (9:0) r0 (9:0) g 1 (9:0) r1 (9:0) g 2 (9:0) g 3 (9:0) r3 (9:0) d out 0?d out 9 line_valid c olumn skip rea d out g 0 (9:0) r0 (9:0) g 2 (9:0) r2 (9:0) r2 (9:0) d out 0?d out 9 line_valid normal rea d out g 0 (9:0) r0 (9:0) g 1 (9:0) r1 (9:0) g 2 (9:0) g 7 (9:0) r7 (9:0) d out 0?d out 9 line_valid c olumn skip rea d out g 0 (9:0) r0 (9:0) g 4 (9:0) r4 (9:0) d out 0?d out 9 line_valid normal rea d out g 0 (9:0) r0 (9:0) g 1 (9:0) r1 (9:0) g 2 (9:0) g 15 (9:0) r15 (9:0) d out 0?d out 9 line_valid c olumn skip rea d out g 0 (9:0) r0 (9:0) g 8 (9:0) r8 (9:0) www.datasheet.co.kr datasheet pdf - http://www..net/
pdf: 09005aef8202ec2e/source: 09005aef8202ebf7 micron technology, inc., reserves the right to change products or specifications without notice. MT9D111__6_rev5.fm - rev. b 2/06 en 127 ?2004 micron technology, inc. all rights reserved. MT9D111 - 1/3.2-inch 2-megapixel soc digital image sensor feature description micron confidential and proprietary figure 25: 64 pixels in normal and column skip 16x readout modes digital zoom digital zoom is not used in soc. binning the sensor core supports 2 x 2 binning of 4 pi xels of the same color. this mode can be activated by asserting r0x20:0[15] (r0x21:0 if context a is used). binning is primarily used instead of 2x skip as a way of decimating the picture without losing information. the effect of aliasing in preview mode is eliminated when binning is used instead of just skipping rows and columns. activating binning has a few implications: ? it adds a level of skip, so the picture that comes out has the same dimensions as a pic- ture read out with the ne xt higher skip setting. ? it increases the minimum hblank and minimum row time requirements (see table 33 and table 34). binning limitations to achieve correct operation, the following conditions must be met: table 31: row addressing number of adcs binning row addressing (not considering start address) 1 no 0, 1, 2, 3, 4, 5, 6, 7,... 2 no 0, 1, 2, 3, 4, 5, 6, 7,... 1 yes 0/2, 1/3, 4/6, 5/7,... 2 yes 0/2, 1/3, 4/6, 5/7,... table 32: column addressing number of adcs binning column addressing (not considering start address) 1 no 0, 1, 2, 3, 4, 5, 6, 7,... 2 no 0/1, 2/3, 4/5, 6/7,... 1 yes 0/2, 1/3, 4/6, 5/7,... 2 yes 0/1/2/3, 4/5/6/7,... d out 0?d out 9 line_valid normal rea d out g 0 (9:0) r0 (9:0) g 1 (9:0) r1 (9:0) g 2 (9:0) g 31 (9:0) r31 (9:0) d out 0?d out 9 line_valid u mn skip rea d out g 0 (9:0) r0 (9:0) g 1 6 (9:0) r1 6 (9:0) www.datasheet.co.kr datasheet pdf - http://www..net/
pdf: 09005aef8202ec2e/source: 09005aef8202ebf7 micron technology, inc., reserves the right to change products or specifications without notice. MT9D111__6_rev5.fm - rev. b 2/06 en 128 ?2004 micron technology, inc. all rights reserved. MT9D111 - 1/3.2-inch 2-megapixel soc digital image sensor feature description micron confidential and proprietary ? start address must be divisible by four (row and column). ? window size must be divisible by four in both directions, after dividing by zoom factor and skip factor (because they both reduce the effective window size from the sensor?s point of view). example: default row size = 1,200. 8x zoom means the actual window on the sensor is divided by 8, so 8x zoom and binning is not allowed with default window size, because 1,200 / 8 = 150, which is not divisible by 4. ? binning can be seen as an extra level of skip. the combination binning/16x skip is therefore not legal. frame rate control for a given window size, the blanking regi sters (r0x05:0 - r0x08:0) along with the row speed register (r0x0a:0) can be used to set a particular frame rate. the frame timing equations (table 27 and table 28 on page 120) can be rearranged to express the horizontal blanking or vertical blanking values as a function of the frame rate: the hblank_reg value allows the frame rate to be adjusted with a minimum resolu- tion of one pixclk_period multiplied by the total number of rows (displayed plus blanking). when finer resolution is required , r0x0b:0 (extra delay) can be used. r0x0b:0 allows the frame time to be changed in increments of pixel clocks. minimum horizontal blanking the minimum horizontal blanking value is co nstrained by the time used for sampling a row of pixels and the overhead in the ro w readout. this is expressed in table 33. minimum row time requirement the total row time must be sufficient to al low all row operations (readout and shutter operations). the row time is the sum of colu mn width (halved during binning divided by column skip factor) and horizontal blanking, and can therefore be adjusted by program- ming these. table 34 shows minimum row time as a function of mode of operation. this is a particularly strict requirement during binning because twice as many row oper- ations are required per row and the column width is halved. hblank_reg = master clock freq / (frame rate* ((r0x03:0/s + border) + vblank_reg )*pixclk_period) - (r0x04:0/s + border) vblank_reg = master clock freq / (frame rate* ((r0x04:0/s + border) + hblank_reg )*pixclk_period) - (r0x03:0/s + border) table 33: minimum horizont al blanking parameters parameter default / 2 adc mode, no binning 1 adc mode, no binning 2 adc mode, binning 1 adc mode, binning hblank(min) 286 mclks 324 mclks = 162 pixclks 470 mclks 508 mclks = 254 pixclks www.datasheet.co.kr datasheet pdf - http://www..net/
pdf: 09005aef8202ec2e/source: 09005aef8202ebf7 micron technology, inc., reserves the right to change products or specifications without notice. MT9D111__6_rev5.fm - rev. b 2/06 en 129 ?2004 micron technology, inc. all rights reserved. MT9D111 - 1/3.2-inch 2-megapixel soc digital image sensor feature description micron confidential and proprietary context switching when the sensor is in the soc bypass mode, r0xf2:0 is designed to enable easy switch- ing between sensor modes. some key registers and bits in the sensor have two physical register locations, called contexts. bits 0, 1, and 3 of r0xf2:0 control which context regis- ter context is currently in use. a ?1? in a bit selects context b, while a ?0? selects context a for this parameter. the select bits can be used in any combination, but by default are setup to allow easy switching between preview mode and full resolution mode: the horizontal blanking and ve rtical blanking values for the two contexts are chosen so that row time is preserved between contexts. this ensures that changing contexts does not affect integration time. a few more contro l bits are also available through the context register (r0xf2:0) so that flash and restarti ng the sensor can be done simultaneously with changing contexts. see table 5, "sensor register description," on page 29 for more information. settings for skip, 1 adc mode, and binning can be set separately for context b and con- text a using r0x20:0 and r0x21:0, respectively. when these settings are referred to in this document, the register is dependent on what context is set in r0xf2:0. for the default (no bypass) mode, context switching is controlled by the sequencer (id=1) driver. table 34: minimum ro w time parameters parameter default / 2 adc mode, no binning 1 adc mode, no binning 2adcmode, binning 1 adc mode, binning row_time(min) 473 mclks 488 mclks = 244 pixclks 931 mclks 946 mclks = 473 pixclks pointer_operations 461 mclks 464 mclks 919 mclks 922 mclks context b (default context) r0xf2:0 = 0x000b (context b) r0x05:0 = 0x015c (horizontal blanking, context b) r0x06:0 = 0x0020 (vertica l blanking, context b) r0x20:0 = 0x0000 (2 adcs, no column or row skip) description: full resolution uxga (1,600 x 1,200) image at 15 fps context a (alternate context, preview mode) r0xf2:0 = 0x0000 (context a) r0x07:0 = 0x00ae (horizontal blanking, context a) r0x08:0 = 0x0010 (vertica l blanking, context a) r0x21:0 = 0x0490 (1 adc, 2x column and row skip) description: half-resolution svga (800 x 600) image at 30 fps www.datasheet.co.kr datasheet pdf - http://www..net/
pdf: 09005aef8202ec2e/source: 09005aef8202ebf7 micron technology, inc., reserves the right to change products or specifications without notice. MT9D111__6_rev5.fm - rev. b 2/06 en 130 ?2004 micron technology, inc. all rights reserved. MT9D111 - 1/3.2-inch 2-megapixel soc digital image sensor feature description micron confidential and proprietary integration time integration time is controlled by r0x09:0 (shu tter width in multiples of the row time) and r0x0c:0 (shutter delay, in pixclk_period/2). r0x0c:0 is used to control sub-row inte- gration times and only has a visible effect fo r small values of r0x09:0. the total integra- tion time, t int, is shown in the equation below: in the equation, the integration overhead corresponds to the delay between the row reset sequence and the row sample (read) sequence. typically, the value of r0x09:0 is limited to the number of rows per frame (which includes vertical blanking rows), so that the frame rate is not affected by the integration time. if r0x09:0 is increased beyond the total number of rows per frame, the sensor adds blanking rows as needed. additionally, t int must be adjusted to avoid banding in the image caused by light flicker. therefore, t int must be a multiple of 1/120 of a second under 60hz flicker, and a multiple of 1/100 of a second under 50hz flicker. maximum shutter delay the shutter delay can be used to reduce the integration time. a programmed value of n reduces the integration time by n master clock periods. the maximum shutter delay is set by the row time and the sample time, as shown in the equation below: if the value in this register exceeds the maximum value given by this equation, the sensor may not generate an image. t int = r0x09:0 * row time - integrat ion overhead - shutter delay where: row time = (r0x04:0/s + border + hblank_r eg)*pixclk_period master clock periods (from table on page 120) s= skip factor, multiplied by 2 if binning is enabled overhead time = 260 master clock periods (262 in 1 adc mode) shutter delay = r0x0c:0 * pixclk_period master cl ock periods (/2 in 1 adc mode) with default settings: t int = (1,232 * (1,600 + 348)) - 260 - 0 = 2,399,676 master clock periods = 66.66ms at 36 mhz maximum shutter delay = (row time - pointer_operations) where: row time = (r0x04:0/s + border + hblank_reg )*pixclk_period master clock periods (from table on page 120) s= skip factor, multiplied by 2 if binning is enabled pointer_operations = see table 34 on page 129. with default settings: maximum shutter delay = (1,600 + 348) - 461 = 1,487 (master clock periods) www.datasheet.co.kr datasheet pdf - http://www..net/
pdf: 09005aef8202ec2e/source: 09005aef8202ebf7 micron technology, inc., reserves the right to change products or specifications without notice. MT9D111__6_rev5.fm - rev. b 2/06 en 131 ?2004 micron technology, inc. all rights reserved. MT9D111 - 1/3.2-inch 2-megapixel soc digital image sensor feature description micron confidential and proprietary flash strobe the sensor core supports both xenon and le d flash through flash output. the timing of flash with the default settings is shown in figure 26, figure 27, and figure 28. r0x23:0 allows the timing of the flash to be changed. the flash can be programmed to: ? fire only once ? be delayed by a few frames when asserted ? and (for xenon flash) the fl ash duration can be programmed when xenon flash is enabled, an integratio n time significantly smaller than one frame causes uneven exposure of the image, as does setting a flash pulse width larger than ver- tical blanking. enabling the led flash causes one bad frame in which several rows have the flash on during only part of their integration time. th is can be avoided by forcing a restart (write r0x0d:0[1] = 1) immediately after enabling th e flash; the first bad frame is then masked out as shown in figure 28. read-only bit r0x 23:0[14] is set during frames that are cor- rectly integrated; the state of this bit is shown below. figure 26: xeno n flash enabled figure 27: led flash enabled note: integration time = nu mber of rows in a frame. figure 28: led flash enabled, using restart note: integration time = nu mber of rows in a frame. frame_valid flash s trobe ba d frame frame_valid flash s trobe flash ena b le d ba d frame g oo d frame g oo d frame flash d isa b le d d urin g this frame d urin g this frame flash ena b le d maske d out g oo d frame g oo d frame flash d isa b le d an d a restart frame an d a restart tri gg ere d tri gg ere d frame_valid flash s trobe maske d out frame www.datasheet.co.kr datasheet pdf - http://www..net/
pdf: 09005aef8202ec2e/source: 09005aef8202ebf7 micron technology, inc., reserves the right to change products or specifications without notice. MT9D111__6_rev5.fm - rev. b 2/06 en 132 ?2004 micron technology, inc. all rights reserved. MT9D111 - 1/3.2-inch 2-megapixel soc digital image sensor feature description micron confidential and proprietary global reset the sensor core provides a global reset mode in which the pixel integration time is con- trolled by an external mechan ical shutter. the sensor can then operate on a lower clock frequency, reducing the bandwidth on the interface between the sensor and the host processor without losing image quality. the basic operation is as follows: 1. the sensor operates in either preview or full-frame mode (electronic rolling shutter [ers]). 2. a rising edge on the signal grst_ctr or a write to an internal register starts the glo- bal reset sequence. 3. the sensor now enters the snapshot mode an d after a certain time, all the lines in the sensor array are reset and kept in a re set state until the integration starts. the start of the integration (exposure) period , the assertion of strobe, the start of the readout, and the de-assertion of strobe can be controlled by internal registers (t1, t2, t3, and t4, as shown in figure 29). the sensor core provides an output signal , strobe, that can be used to control the mechanical shutter. this si gnal can be programmed to occur in a specified window around the actual start of integration. duri ng global reset, flas h is programmed in a different way than during normal ers operat ion. normally, the flash behavior is pro- grammed using r0x23:0. in global reset mode, flash is programmed in the same way as strobe, showed in figure 29, using registers r0xc5:0 and r0xc6:0. r0xc0:0[0] controls the mechanism for starti ng the readout after a global reset oper- ation. if this bit is high, the integration ti me is directly controlled by grst_ctr. very long integration times can be achieved this way. figure 29: glob al reset operation analog signal path the sensor core features two identical anal og readout channels. a block diagram for one channel is shown in figure 30. the readout ch annel consists of two gain stages (asc1 and asc2), a sample-and-hold (adcsh) stage with black level calibration capability (v offset ), and a 10-bit adc. global reset complete integration starts readout can start ers mode snapshot mode e r s m ers mode reset pixel array integration until shutter close readout frame wait grst_ctr strobe t1 t2 t3 t4 www.datasheet.co.kr datasheet pdf - http://www..net/
pdf: 09005aef8202ec2e/source: 09005aef8202ebf7 micron technology, inc., reserves the right to change products or specifications without notice. MT9D111__6_rev5.fm - rev. b 2/06 en 133 ?2004 micron technology, inc. all rights reserved. MT9D111 - 1/3.2-inch 2-megapixel soc digital image sensor feature description micron confidential and proprietary figure 30: analog readout channel stage-by-stage transfer functions transfer functions proceed stage-by-stage, as follows: where g1, g2, and g3 are the gain settings, v offset is the offset (calibration) voltage, and v refd is the reference voltage of the adc. the ga in setting g3 is applied to the signal but is not applied to v offset . the parameters v refd , g1, g2, g3, and v offset are described next. v refd the v refd parameters are as follows: gain settings: g1, g2, g3 the gains for green1, blue, red, and green2 pixels are set by registers r0x2b:0, r0x2c:0, r0x2d:0, and r0x2e:0, respectively. gain can al so be globally set by r0x2f:0. the analog gain is set by bits 8:0 of the corresponding register as follows: digital gain is set by bits 11:9 of the same registers. let v pix be the input of the signal path: v pix = pixel output voltage = signal path input voltage, the output voltage of asc 1st stage is: v1 = -1*g1*v pix (1) the output voltage of asc 2nd stage is: v2 = -1*g2*v1 (2) the output voltage of adc sample-and- hold stage is: v3 = 2*g3*v2 - v refd + v offset (3) and the adc output code is: adc output code = 511*(1 + (v3 / vr efd )) (4) from (1) to (4), the adc output code can also be written as: adc code = (1022/v refd )*[g1*g2*g3*v pix + (voffset/(2*g3))] (5) the adc reference voltage v refd i s: v refd = v ref _ hi - v ref _ lo (6) where v ref _ hi = 55.5mv*(r0x41:0[7:4] + 23) (7) using default register values: v ref _ hi = 55.5mv*(13 + 23) = 1.998v and v ref _ lo = 55.5mv*(r0x41:0[3:0] +11) (8) using default register values: v ref _ lo = 55.5mv*(7 +11) = 0.999v so v refd = 55.5mv*(r0x41:0[7:4] - r0x41:0[3:0] + 12) (9) using default register values v refd = 1.998 - 0.999 = 0.999v g1 = bit 7 + 1 (10) g2 = bit 6:0 / 32 (11) g3 = bit 8 + 1 (12) a sc 1 a sc 2 ad cs h 10- b it ( g 1) ( g 2) ( g 3) ad c v1 v2 v3 vpix ad c _ c o d e 10 v off s et v refd + www.datasheet.co.kr datasheet pdf - http://www..net/
pdf: 09005aef8202ec2e/source: 09005aef8202ebf7 micron technology, inc., reserves the right to change products or specifications without notice. MT9D111__6_rev5.fm - rev. b 2/06 en 134 ?2004 micron technology, inc. all rights reserved. MT9D111 - 1/3.2-inch 2-megapixel soc digital image sensor feature description micron confidential and proprietary offset voltage: v offset the offset voltage provides a constant offset to the adc to fully utilize the adc input dynamic range. the offset voltages for green1, blue, red, and green2 pixels are manually set by registers r0x61:0, r0x62:0, r0x63:0, and r0x64:0, respectively. the offset voltages also can be automatically set by the black level calibration loop. for a given color, the offset voltage, v offset , is determined by: offset_gain is determined by the 2-bit code from r0x5a:0[1:0], as shown in table 35. these step sizes are not exact; increasing the stage0 adc gain from 2 to 4 decreases the step size significance; decreasing the adc v refd increases the step size significance. recommended gain settings the analog gain circuitry in the sensor core provides signal gains from 1 through 15.875. analog inputs ain1?ain3 since adc resources in the sensor core are not used to digitize pixel array output 100 percent of the time, they can be intermitte ntly used to sample external analog sig- nals coming from a variety of sources?e.g., a flash charging circuit or an auto focus lens actuator. if r0xe3:0[15] = 1, the chip samp les ain1?ain3 once per every pixel array row (after reading out the row). digital data prod uced by this sampling are available to the user in two ways: ? they can be read from regi sters r0xe0:0 through r0xe2:0. ? if r0xe3:0[14] = 1, the data are additionally inserted into image data stream each time line_valid goes low. the nominal range of ain are 0v + v offset to v refd + v offset . v refd is the adc reference voltage (nominally 1v), but can be programmed. (see ?analog signal path? on page 132.) v offset is the offset in the adc and is typically 10mv to 20mv. if required, the offset can be measured by converting a calibrated reference voltage, which can be v offset = 0.50v*offset_gain*offset_sign*offset_code[7:0]/255 (13) where: ?offset_sign? is determined by bit 8 as: if bit 8 = 0, offset_sign = +1 (14) if bit 8 = 1, offset_sign = -1 (15) ?offset_code? is the decimal value of bit<7:0> table 35: offset gain r0x5a:0[1:0] offset_gain 00 offset_gain = 0 (no calibration voltage is applied) 01 offset_gain = 0.25 (1 calibration lsb is equal to 0.5 adc lsb when v refd = 1v) 10 offset_gain = 0.50 (1 calibration lsb is equal to 1 adc lsb when v refd = 1v) 11 offset_gain = 1 (1 calibration lsb is equal to 2 adc lsb when v refd = 1v) table 36: recommended gain settings desired gain recommended gain register setting 1?1.969 0x020?0x03f 2?7.938 0x0a0?0x0ff 8?15.875 0x1c0?0x1ff www.datasheet.co.kr datasheet pdf - http://www..net/
pdf: 09005aef8202ec2e/source: 09005aef8202ebf7 micron technology, inc., reserves the right to change products or specifications without notice. MT9D111__6_rev5.fm - rev. b 2/06 en 135 ?2004 micron technology, inc. all rights reserved. MT9D111 - 1/3.2-inch 2-megapixel soc digital image sensor feature description micron confidential and proprietary used to compensate at the input. the adc is designed to operate with differential inputs. since ain1?ain3 are used as single-ended inputs to the adc, it is recommended to average values from several samples (if possible, a whole frame) to cancel out noise. figure 31: timing di agram ain1?ain3 sample pix pix line_valid data_out pix c lk pix pix (1 ad c mo d e) data_out (2 ad c mo d e) ain3 x ain2 x ain1 x line_valid pix c lk x ain3 x ain2 x ain1 (2 ad c mo d e) (2 ad c mo d e) (1 ad c mo d e) (1 ad c mo d e) www.datasheet.co.kr datasheet pdf - http://www..net/
pdf: 09005aef8202ec2e/source: 09005aef8202ebf7 micron technology, inc., reserves the right to change products or specifications without notice. MT9D111__6_rev5.fm - rev. b 2/06 en 136 ?2004 micron technology, inc. all rights reserved. MT9D111 - 1/3.2-inch 2-megapixel soc digital image sensor firmware micron confidential and proprietary firmware firmware implements all automatic function ality of the camera, including auto expo- sure, white balance, auto focus, flicker detection and so on. the firmware consists of drivers, generally one driver per each major control function. the firmware runs on a 6811-compatible microc ontroller with a mathematical co-processor. 32k of metal mask- programmable prom is available for non-volatile code. 2k of volatile sram is available, where typically the first 1k of sram is used by the prom drivers for data and stack, while to the second 1k is reserved for loadable custom code. the firmware and mcu subsystem targets to achieve the following high-level goals and features: ? execute applications from rom and ram ? execute applications in real-time, synchronized to ifp ? allow loading custom executable programs ? firmware controls ifp by reading and writing ring bus registers ? firmware consists from drivers and bootstrap code ? user can extend or override functionality of rom drivers ? user can add all new drivers ? drivers have variables; user configures drivers by setting variables via two-wire serial interface ? when idle, puts mcu into low-power sleep mode ? a minimal code overhead due to flexibility ? transparency from firmware build version ? stability, diagnostics and recovery from software crashes ? framework for application and driver development the firmware is written in c with some inline assembler where extra performance is required. it runs on 6811-compatible microc ontroller with a mathematical co-processor. overview of architecture bootstrap routine the firmware consists of a bootstrap code , drivers and a test module. the bootstrap code initializes internal low-level mcu register s, performs a mini-sel f-test, and sets up a 128-bytes deep stack. the main routine is then invoked. drivers firmware applications are organized into driv ers. each driver performs a specific func- tion. each driver has its own data structure with various variables. the user can access the data structure via r198:1 and r200:1 to re ad or write variables. the access is imple- mented using hardware direct memory access (dma). drivers are static objects with virtual methods. each driver has an associated data struc- ture and a driver id. to access a driver variable, the user must know driver id and vari- able offset in the data structure. driv er methods are implemented using a virtual method table (vmt). vmt is a table of pointers to driver methods. the object data struc- ture has a pointer to vmt. software routines must call methods indirectly, via vmt pointer. this allows overriding of methods. extending and overriding drivers vmts are necessary to be able to override a driver. to override a driver, the software developer has to perform the following steps: 1. load executable code www.datasheet.co.kr datasheet pdf - http://www..net/
pdf: 09005aef8202ec2e/source: 09005aef8202ebf7 micron technology, inc., reserves the right to change products or specifications without notice. MT9D111__6_rev5.fm - rev. b 2/06 en 137 ?2004 micron technology, inc. all rights reserved. MT9D111 - 1/3.2-inch 2-megapixel soc digital image sensor firmware micron confidential and proprietary 2. construct new vmt a. use pointers to the new functions b. use old pointers to call old methods 3. new methods can call inherited functions using old vmt pointers 4. point driver data structure vmt pointer to the new vmt the main routine continues firmware initialization by calling driver initialization func- tions. if all drivers initialization completes without error, the main function indicates a successful firmware start by setting a code in r195:1. the user can request the firmware to start in a special test mode. the bootstrap code reads r195:1 and invoke the corre- sponding routine. variables the main routine sets up a system table of poin ters to drivers. the address of the table is recorded in sfr 0x1050. the hardware dma uses this register to implement logical access to variables. mcu sram can be accessed in two ways: 1. by specifying a physical address (physical mode) 2. by specifying driver id and variable offset in driver's data structure (logical mode) in physical mode, the user writes address to be accessed (read or written) in r198:1 and reads or writes data in r200:1. prom data is not accessible using this mechanism. in logical mode, the user writes driver id and variable offset combination in r198:1 and reads or writes data in r200:1. this mode al lows accessing driver variables regardless of their physical location, which can change from one firmware version build to another. in this sense variables are very much like hardware registers. uploading custom code to upload custom code 1. write application data to sram using physical variable access 2. use monitor driver to invoke the code see ?monitor driver? on page 139 for details. hardware resource programming the mcu subsystem provides a number of hardware resources to the software devel- oper. these resources include dma to enable user access variables. watchdog the watchdog monitors execution of firmwa re and resets mcu when a time out is detected. during normal execution the firmwa re must reset the watchdog periodically or disable it. sleep and wakeup logic is available to suspend mcu clock and enter low-power mode. the mcu can wake up synchronously with ifp when ifp is processing a line with a specified number. internal register bus access the firmware has master access to the ring bus and can read and write any hardware register. www.datasheet.co.kr datasheet pdf - http://www..net/
pdf: 09005aef8202ec2e/source: 09005aef8202ebf7 micron technology, inc., reserves the right to change products or specifications without notice. MT9D111__6_rev5.fm - rev. b 2/06 en 138 ?2004 micron technology, inc. all rights reserved. MT9D111 - 1/3.2-inch 2-megapixel soc digital image sensor firmware micron confidential and proprietary gpio and waveform generator on local bus for better performance gpio and waveform generator are connected to the local 6811 sfr bus. high-precision timer a 32-bit master clock (80 mhz) counter for code profiling or time measurements. sleep and wakeup programming to sleep and wake up on a certain line, program the following: 1. set line number to wake up at sfr 0x1042. a. user can choose to wake up on ifp line, referred to interpolation, or frame enable of ifp, sensor, jpeg, and fifo. the edge and level are selectable. 2. clear sfr 0x1040[0]. b. this clears previous sleep event notification. 3. read from sfr 0x1040 to attempt sleeping. c. mcu tries entering sleep mode. mcu does not sleep if dma is happening or the wakeup line number is reached or gp io notification signal is asserted. 4. read sfr 0x1040 to check if sleep succeeded note: if bit 0 is set, sleeping was successful. otherwise repeat step 3. a library function is available for easy sleep mode usage. two-wire serial interface programming the microcontroller can access all registers on the ring bus. the access is enabled by custom sfrs located at addresses 0x1060 through 0x1066. to carry out a bus read, set desired i/o page in read_iopage and write de sired register address to read_ioadr to initiate the read transaction. poll iostatus until it returns a ?0.? the read data is avail- able in iodata. to carry out a bus write, set the desired i/o page in write_iopage. and the register address in write_ioadr. load write data into iodata to initiate a write transaction. poll iostatus until it returns a ?0? to sign al the completion of the write transaction. a library function is available for easy sleep usage. dma programming set up table of variables for logical access. driver id corresponds to the pointer offset in the table. program table address into sfr 0x1050. warm restarts and watchdog programming the watchdog register can detect a software cr ash and have the system recover from it by issuing a hardware reset. the watchdog re sets the microcontrol ler subsystem if sfr 0x1040 register have not been cleared for n frames. number n is programmed in the watchdog_reg. setting n to ?0? disables the watch- dog. the user may need this option when the microcontroller runs a lengthy task, e.g., calculation of crc or ram testing. when the watchdog resets the microcontroller, os restarts and checks for restart reason. register restart_code specifies the probable code. the user can also see restart code by reading r195:1. a restart caused by resetting the chip is called a "cold" restart. restart caused by the watchdog, software, or illegal code trap are called "warm" restarts. www.datasheet.co.kr datasheet pdf - http://www..net/
pdf: 09005aef8202ec2e/source: 09005aef8202ebf7 micron technology, inc., reserves the right to change products or specifications without notice. MT9D111__6_rev5.fm - rev. b 2/06 en 139 ?2004 micron technology, inc. all rights reserved. MT9D111 - 1/3.2-inch 2-megapixel soc digital image sensor firmware micron confidential and proprietary high-precision timer sfr 0x1048 is a high-precision timer is avai lable for use in applications, and profiling code during development. it is a 32-bit counter incremented every master clock, except when in standby. to profile, read and store the timer before executing a routine. after the routine exits, read the timer again and subtract from the initial value. safe and test modes a safe mode is available to start mcu without running drivers. set r195:1 and reset mcu to enable this mode. only monitor runs al lowing to start rom or load and start ram code. r195:1 can also invoke the mcu and memory test mode. application scheduling drivers run in synchrony with ifp image processing. as the frame comes through the color pipeline in real time, certain statistics are calculated and become available. typi- cally, the flicker avoidance driver is active at the top of the frame. auto focus measure- ment window is located in the center of the image. once its result is ready, the auto focus and auto focus mechanics drivers execute. the exposure, white balance, and histogram statistics windows nearly cover the entire image. their result is available at the end of the frame, when ae, wb, and histogram drivers are invoked. finally, during the vertical blanking, drivers upload calculat ed settings to sensor and soc. monitor driver the main monitor function is to run code. set the "arg1" to the address of the function to be called, set ?arg2? to an op tional 16-bit parameter to be passed and set "cmd" to 0x01. the sequencer driver calls the monitor driver typically once per frame. the desired func- tion is invoked in one frame time or less. the monitor also provides crc calculation capability to check if the uploaded firmware was transmitted correctly. variable mon.ver contains firmware version number. mon.ver[7] = 1 indicates uploaded firmware. fli c ker avoi d an c e auto fo c us exposure, white balan c e, hist . uploa d re g isters www.datasheet.co.kr datasheet pdf - http://www..net/
pdf: 09005aef8202ec2e/source: 09005aef8202ebf7 micron technology, inc., reserves the right to change products or specifications without notice. MT9D111__6_rev5.fm - rev. b 2/06 en 140 ?2004 micron technology, inc. all rights reserved. MT9D111 - 1/3.2-inch 2-megapixel soc digital image sensor firmware micron confidential and proprietary figure 32: sequencer driver sequencer driver the sequencer is a finite state machine that controls the operation of main functions and the switching between modes. camera oper ation is organized as states, such as pre- view or capture. the sequencer carries out a number of programs, such as previewing, preview lock, capture, and so on. the state of the sequencer is indicated in va riable state. to have the sequencer execute a certain program, set the program number in cm d. the host then should monitor state to know when to change resolution and/or capture frames. each state has its configuration (see "firmw are driver variables" on page 68). before executing programs, set up state configurations to customize the program. for example, to capture compressed frames, enable compression in capture state configuration. a typical scenario includes the following: 1. configure mode variables after hardware reset a. set up sensor image size for preview b. set up displayed image size c. set up fifo to smooth data rate 2. configure preview mode leave preview c h.mo d e to c apture c apture s tan db y do s tan db y refresh ifp run enter c apture leave c apture do preview do c apture c h.mo d e to preview enter preview refresh s ensor run do preview init lo c k do preview do c apture lo c k preview www.datasheet.co.kr datasheet pdf - http://www..net/
pdf: 09005aef8202ec2e/source: 09005aef8202ebf7 micron technology, inc., reserves the right to change products or specifications without notice. MT9D111__6_rev5.fm - rev. b 2/06 en 141 ?2004 micron technology, inc. all rights reserved. MT9D111 - 1/3.2-inch 2-megapixel soc digital image sensor firmware micron confidential and proprietary a. set auto exposure, white balance and auto focus speed 3. execute sensor refresh command 4. run in preview until shut ter button is depressed a. if the shutter button is depresse d halfway, execute the lock program i. configure preview state to disable necessary functions to be locked, e.g., auto exposure, white balance, and auto focus ii. configure previewleave state for fast settling of those functions iii. execute the lock program iv. the lock program transits previewlea ve state, perform fast settling, and return to preview state, which was configured to freeze (lock) b. if the shutter button is depressed all the way, execute the capture program i. if already in lock mode, disable prev iewleave state and execute capture pro- gram ii. if not in lock state and some settling is required (auto focus), configure pre- viewleave state for fast settling iii. execute capture program. the progra m transitions to previewleave, perform required settling and proceed through mode change to capture 5. capture frame a. preconfigure capture mode variables for correct image size, compression, and select video/still b. monitor the "state" variable. when the state is capture, grab the frame(s) optionally, configure capture enter or preview leave to have output blanked. this helps grabbing correct frame for capture. flash types and settings the sequencer supports three types of flash light source: ?led ?xenon ? xenon continuous flash type is selected using seq.sharedparams.flashtype. states in the sequencer diagram have an associ ated flash setting. that setting is specified using variables such as seq.prevparenter.flash. the four settings available are shown in table 37. using led flash to perform cm_lock 1. set previewleave flash configuration to mode_flash_auto. set the state's ae and wb to fast settling 2. set preview flash config uration to mode_flash_off 3. perform cm_lock. that turns flash on in low-light conditions, perform fast ae/wb settling, return to preview and turn flash off table 37: flash types and settings type setting mode_flash_off turns flash off mode_flash_on turns flash on mode_flash_auto checks for lo w-light condition and turns flash on if necessary mode_flash_locked turns flash on or off to put it into the state sele cted by mode_flash_auto www.datasheet.co.kr datasheet pdf - http://www..net/
pdf: 09005aef8202ec2e/source: 09005aef8202ebf7 micron technology, inc., reserves the right to change products or specifications without notice. MT9D111__6_rev5.fm - rev. b 2/06 en 142 ?2004 micron technology, inc. all rights reserved. MT9D111 - 1/3.2-inch 2-megapixel soc digital image sensor firmware micron confidential and proprietary to continue with capture after cm_lock 1. disable all automatic functions in previewleave. set flash mode to mode_flash_locked 2. disable captureenter state 3. perform cm_capture. that restores flash state in previewleave and make a snap- shot to perform cm_capture without cm_lock 1. set previewleave flash configuration to mode_flash_auto. set the state's ae and wb to fast settling. 2. disable captureenter state 3. perform cm_capture. that automatically turns flash on, perform fast settling and make a snapshot note: when the led flash is turned on, the current frame coming out has not seen the effect of the led; therefore, use the skipframe variable to skip a frame when turning the led on. using xenon burst flash this type of flash fires on every frame. in many respects it is similar to led, except that the sensor integration time must always be more than 1 frame. using xenon flash the three flash types ha ve their own specifics. to capture images using one-sh ot xenon, do the following. 1. if using cm_lock, carry out the lock operation as usual 2. before issuing cm_capture, re-program the sequencer to disable automatic advancement from state to state, seq.stepmode 3. reprogram captureenter state to have al l automatic functions off (ae, af, wb, fd) 4. advance to modechange and load xenon-spec ific parameters directly into the color pipeline ? color matrix for xenon r96-r102:1 ? integration time r9:0 (1 full frame or more) ? analog gains, r0x2b?0x2e:0 ? digital gains r78:1, r106?109:1 low-light operation a number features are available to improve image quality in low-light conditions: ? increased noise suppression in interpolation ? reduced color saturation ? reduced aperture correction ? increased aperture correction threshold ?y-filter the seq.sharedparams.llmode variable enables individual low-light features. seq.sharedparams.llvirtgain1 and 2 specify ga in thresholds to enable some of these features. values are given by seq.sharedparams.llinterpthresh1/2, llsat1/2, llapcorr1/2 and llapthresh1/22. www.datasheet.co.kr datasheet pdf - http://www..net/
pdf: 09005aef8202ec2e/source: 09005aef8202ebf7 micron technology, inc., reserves the right to change products or specifications without notice. MT9D111__7_rev5.fm - rev. b 2/06 en 143 ?2004 micron technology, inc. all rights reserved. MT9D111 - 1/3.2-inch 2-megapixel soc digital image sensor firmware micron confidential and proprietary firmware auto exposure driver the ae driver works to achieve desirable exposure by adjusting sensor core?s integration time, analog, and digital gains. the driver can be configured with respect to desired ae speed, maximum and minimum frame rate, the range of gains, brightness, backlight compensation, and so on. ae driver typically runs in one of these modes. the modes are set in the sequencer driver for each sequencer state. ? fast settling preview?reach target exposure as fast as possible ? continuous preview?a slow-changin g mode good for video capture ? evaluative?evaluate current scene an d adjust exposure for still capture some key variables affecting all modes: ?ae.target? controls target exposure for all modes. increasing or decreasing this vari- able makes the image brighter or darker ? ae.gate?how accurate ae driv er tracks the target exposure ? ae.weights?specify weights for central and peripheral backlight compensation in preview modes ae driver adjusts exposure by programming sensor gains, r43?46:0 and r65:0, sensor integration time r9:0 and r12:0 and ifp digital gains r78:2 and r110:1. evaluative auto exposure evaluative ae (eae) selects optimum exposure for scenes where conventional ae does not give good results: ? scenes involving sun ? back light scenes ? strong contrast scenes and so on eae breaks down input image into a 4 x 4 gr id of subwindows and analyzes their expo- sure value (ev) readings. it evaluates brightness and contrast in the image, the scene and adjusts exposure appropriately. variable s ae.mmevzone1/2/3/4 keep programmable thresholds defining brightness classes. variable ae.mmshift ev is used to calibrate ev readings for particular module type. auto white balance driver awb detects the temperature of the light source in the scene and adjusts color correc- tion to always produce image for srgb display. in other words, it makes the gray areas in the raw image look also gray in the output im age. to detect the illuminant temperature, the driver reads results genera ted by the statistics block in the color pipeline, r48?50:1. color correction is achieved via adjusting sensor analog rgb gains r43?46:0, ifp digital rgb gains r106?109:1, and coefficients of the color correction matrix r96?102:1. the adjustment is done in two ways: the driver adjusts rgb gains to achieve a gr ay output. when gains are too large, the driver also adjusts the ccm. during part calibration, two sets of ccm coefficients are obtained, one for red-rich, incandescent illumi nation and one for blue-rich daylight illu- mination. these two sets are specified in the awb driver using awb.ccml and awb.ccmrl arrays of variables. variable awb.ccml corresponds to the red-rich set, also called left. variable awb.ccmrl is the delta between blue-rich?or right?and the left sets. ccm programmed into the color pipeline is available in variables awb.ccm. the current setting is calculated by interpolating between the left and right sets. the awb.ccm position indicates the position, from 0?left, red-rich to 127?right, blue-rich. www.datasheet.co.kr datasheet pdf - http://www..net/
pdf: 09005aef8202ec2e/source: 09005aef8202ebf7 micron technology, inc., reserves the right to change products or specifications without notice. MT9D111__7_rev5.fm - rev. b 2/06 en 144 ?2004 micron technology, inc. all rights reserved. MT9D111 - 1/3.2-inch 2-megapixel soc digital image sensor firmware micron confidential and proprietary for example, cool-white office illumination tends to have a positi on near 64. variables awb.ccmpositionmin, awb.ccmpositionmax, awb.gainmin, awb.gainmax specify ccm position and digital rgb gain limits. when changing these settings, issue a refresh command to put new values into effect. awb speed is controlled by awb.jumpdivisor and awb.gainbufferspeed. awb statistics window typically covers the entire image. it s size is set by awb.windowpos and awb.win- dowsize. issue a refresh_mode command for settings to take effect. awb can be forced to daylight when ae detect s outdoor condition, see seq.mode[5]. awb can be operated manually in two ways: 1. set awb.mode[5] = 1. this forces digital rgb gains to unity. program desired ccm position into awb.ccmposition. 2. set awb.ccmpositionmin and awb.ccmpositionmax limits to desired position. issue refresh command. ccm moves into specified position. to fix gains to unity, set awb.gainmin and awb.gainmax to 128. othe rwise digital gains continue changing automatically. auto focus driver the af driver works to find best lens position providing maximal image sharpness. the driver operates in two modes: manual and au to mode. in manual mode (af.mode[7] = 1) focus position is defined by variable af.bestp osition. user can change lens position from af.posmin to af.posmax. automatic mode is started by af.mode=1, the driver automatically scans af.numsteps focal zones to find best position. af driver makes search of the best focus position based on average sharpness and luma information received from 16 programmable windows. each filter kernel has seven user-programma ble elements specified in registers r75:2, r75:2, r85:2 and r86:2. user can specify wi ndow size and position (af.windowpos, af.windowsize), number of the focal zones to scan (af.numsteps), weight for each win- dow (af.zoneweights). public variables of the af driver listed in table 15, "driver variables-auto focus driver (id = 5)," on page 82 and register settings defining the af filters (see page 14) are all the parameters that one needs to pay attention to when customizing the built-in af algo- rithm. the af driver variables include two unsigned characters (bytes) named af.win- dowpos and af.windowsize that should be used to adjust position and size of the af windows instead of direct writes to registers r[64:66]:2. it is certainly possible to access these registers directly, and new values writte n to them have immediate effect. however, these values remain in effect only as long as sequencer driver, the master firmware driver continuously running on MT9D111 micr ocontroller unit (mcu), does not call af driver function af_setsize (or its user-su pplied substitute). the sequencer calls this function at its initialization, at every chan ge of sensor operation mode (e.g. from pre- view mode to capture mode), and also whenever sq.cmd variable is set to 6 in the pre- view mode. the function af_setsize translat es the current settings of af.windowpos and af.windowsize to corresponding settings of registers r[64:66]:2 and writes these settings over the previous values of the registers. there is no way to change the precedence of af.windowpos and af.windowsize over the regi ster settings other than by overriding the function af_setsize. in addition to programming the registers r[64:66]:2, the function af_setsize automati- cally sets af.wakeupline in accordance with af.windowpos and af.windowsize, so that during every frame readout the af driver is activated 2 rows below the bottom of the 4x4 array of af windows. if af.windowpos and af.windowsize are such that the bottom of the www.datasheet.co.kr datasheet pdf - http://www..net/
pdf: 09005aef8202ec2e/source: 09005aef8202ebf7 micron technology, inc., reserves the right to change products or specifications without notice. MT9D111__7_rev5.fm - rev. b 2/06 en 145 ?2004 micron technology, inc. all rights reserved. MT9D111 - 1/3.2-inch 2-megapixel soc digital image sensor firmware micron confidential and proprietary array is outside the frame, the value given to af.wakeupline by af_setsize is invalid (greater than frame height) and must be changed to something less than the frame height?otherwise af does not work. auto focus mechanics driver the auto focus mechanics (afm) driver comp rises functions and variables that enable the af driver to control different types of lens actuators through the general purpose i/o module (gpio). the afm driver provides the af driver with a single, abstract, hardware- independent control interface hiding from it all details of gpio programming and gpio interactions with external devices. each type of lens actuator requires different input sig- nals and produces different response (lens movements and feedback signals), but can be controlled by the af driver using only 4 variable function pointers (afm.vmt->pinit, afm.vmt->psetpos, afm.vmt->pexeccmd, afm.vmt->pgetstatus) and three 1-byte vari- ables (afm.curpos, afm.prepos, and afm. backlash) supplied by the afm driver. the function pointers are variable (by changing the value of afm.vmt) because they must point to different afm driver functions depending on the curr ent selection of lens actu- ator type indicated by the variable afm.type. by default, afm.type equals 0 and the point- ers point to dummy functions that do nothin g. the af driver can safely use them, but using them has no effect on the gpio - it gene rates no output signals. this is appropriate when no external af hardware is connected to it. if there is a lens actuator to control, the af driver can do so only after the afm.vmt is changed to give it access to the device- matching control functions in the afm driver . proper simultaneous change of afm.type and afm.vmt can be requested at any time fr om the MT9D111 sequencer, by first setting afm.type to desired new value plus 128 and then setting seq.cmd to 5. the afm driver supports three types of lens actuators, one of which (stepper motor type, afm.type=2) includes a variety of devices from different vendors, while the second (heli- morph type, afm.type=1) encompasses just one ac tuator as of this writing. however, this actuator is representative of a broad category of devices that are controlled by writing simple commands through their serial interfac es and provide no feedback on their sta- tus. the afm driver functionality developed to handle one such device can be partly reused to handle other similar devices. the third device (afm.type=3) supported is the ad5398 10-bit dac ic. mode driver the mode driver reduces integration effort s by managing most aspects of switching between preview (mode a) and capture (mode b) modes. it remembers vital register val- ues for each image acquisition mode and uplo ads these values to the appropriate regis- ters upon each mode switch. in addition to remembering the register data, it also creates preloaded and custom gamma and co ntrast tables for each mode. to change the mode driver parameters, upload the new values to the mode driver table (id = 7). upon the next mode change or sequencer refresh (cm_refresh) com- mand, these mode driver values are uploaded to the appropriate sensor and system reg- isters, and the image processing then reflects the new values (at the beginning of the next frame acquired). to control the output image size, upload the dimensions to the mode driver variables: output width_a, output he ight_a, output width_b and output height_b. the mode driver automatically applies any appropriate downsizing filter to achieve this output image size as well as updating the fifo output size when in jpg bypass (raw) mode. it is important so set-up the imager to output an image equal to or la rger than the target output image. it is also important for the crop window (crop_left_a/b and crop_right_a/ b) to be equal to or larger than the target output image. www.datasheet.co.kr datasheet pdf - http://www..net/
pdf: 09005aef8202ec2e/source: 09005aef8202ebf7 micron technology, inc., reserves the right to change products or specifications without notice. MT9D111__7_rev5.fm - rev. b 2/06 en 146 ?2004 micron technology, inc. all rights reserved. MT9D111 - 1/3.2-inch 2-megapixel soc digital image sensor firmware micron confidential and proprietary to upload a custom gamma table, upload th e values to the appropriate mode driver locations (see table 18, "driver variables-jpeg driver (id = 9)," on page 97), and select the gamma table type to be three (user define d) for the particular mode. if a contrast level is selected, it is applied to the user uploaded gamma table. the driver contains settings for raw and ou tput image size and pan for each mode. see variables such as mode.sensor_col_width_a/b, mode.sensor_row_height_a/b and mode.fifo_width_a/b, mode.fifo_height_a/b . blanking and readout mode? the use of skip, binning, and 1adc modes? is configured using sensor core registers r5:1-8:1 and r32:1, r33:1. to change overall image brightness by chan ging adding luma o ffset at output, set ? mode.y_rgb_offset_a for preview ? mode.y_rgb_offset_b for capture to c hang e outp ut fo r ma t, se t ? mode.output_format_a for preview ? mode.output_format_b for capture similarly, the user can set special effects for each mode using mode.spec_effects_a/b. histogram driver the histogram driver continually works to re duce image flare and continually analyzes input image histogram and dynamically adju sts the black level, r59:1. when flare is present the histogram does not contain dark to nes, causing the driver to subtract off a higher black level thus regaining the lost co ntrast. in certain situations the scene may contain no dark tones without flare. the hi stogram driver cannot distinguish this situa- tion and alters the black level just the same, causing the image to have more contrast, which looks acceptable in many situations. variable hg.maxdlevel sets the maximum level that can be subtracted off the input data. set this value to match lens flare percentage. for example, if a lens typically has a 5 percent flare, set this value to 0.05*1024 = 51. to disable flare subtraction in all modes, set this value to ?0.? the maximum allowed va lue is 128. read variable hg.dlevel to see the current subtracted value. hg.percent indicates how many percent of histogram dark tones need to be clipped. the recommended value is 0. the hg.dlevelbufferspeed con- trols the speed of adjustment, 32 being fastest and 1 being the slowest. flicker avoidance driver indoor light sources powered from the wall ac power supply often exhibit fast oscilla- tions. the oscillations are too fast to be seen; their frequency often being the frequency of the wall power supply. the oscillations in teract with the sensor and can show in the image as standing or rolling horizontal bars. such bars are visible when sensor integra- tion time is not a natural multiple of the flicker period. since there are two ac frequen- cies in common use, 50hz and 60hz, the imager integration time must match to ambient indoor flicker freque ncy to produce good images. the MT9D111 can automatically detect the pres ence of flicker and adjust its integration time to avoid it. to set up flicker avoidance program the following variables: ? fd.r9_step60 and fd.r9_step50 are flicker periods for 50 and 60hz illumination expressed in row time, fd.r9_step60=tflk/trow. for 60hz (1/120)/trow and for 50hz (1/100)/trow. the light flicker frequency is twice the power frequency due to rectifica- tion. www.datasheet.co.kr datasheet pdf - http://www..net/
pdf: 09005aef8202ec2e/source: 09005aef8202ebf7 micron technology, inc., reserves the right to change products or specifications without notice. MT9D111__7_rev5.fm - rev. b 2/06 en 147 ?2004 micron technology, inc. all rights reserved. MT9D111 - 1/3.2-inch 2-megapixel soc digital image sensor firmware micron confidential and proprietary ? fd.search_f1/2_50 and fl.search_fl/2_60 are ranges of frequencies to look for: fd.search_f1_50=0.2*fd.r9_step60-1; fd.search_f2_50=0.2*fd.r9_step60+1; fd.search_f1_60=0.2*fd.r9_step50-1; fd.search_f2_60=0.2*fd.r9_step50+1 ? fl.stat_min and fl.stat_max are detection thresholds; for flicker to be detected fl.stat_max continuous frames must co ntain the searched frequency at least fl.stat_min times other variables are as follows: fd.windowposh indicates current sampling window position. variable fl.windowheight indicate window size. do not change these variables. flicker can operate in automatic and manual modes. automatic mode is enabled by default, fd.mode[5] indicates current 50hz/6 0hz frequency selection. make sure to set flicker detection bits in sequencer states . to choose manual mode, set fd.mode[7]=1. bits fd.mode[6] is used for manual 50hz/60h z frequency selection. as frequencies are selected, the auto exposure integration time step is assign ed the appropriate fd.r9_step50/60 variable value. for the flicker avoidance driver to operate correctly, the sensor frame rate may not be exactly 15 fps or 30 fps. frame rate must be tuned off the exact frame rate. this is a nec- essary condition to have the flicker bars rolling. for this reason the preview mode frame rate is typically deliberately set not to exactly match 15 fps or 30 fps. however, in capture mode, the frame rate is set exactly, assuming that the flicker has already been detected and compensated during preview. jpeg driver the jpeg driver programs huffman table and quantization table memories, sets up the MT9D111 to output jpeg compressed data, and handles error checking and handshak- ing with the host processor. usage jpeg is enabled using mode.mode_config. for example, to enable compression for cap- ture set mode.mode_congif=16. jpeg.qscale1/2 /3, and specify the quantization factor to control compression ratio. bigger number in dicates more compression. mode.fifo* con- figure spoof and non-spoof output and specify fifo output clock divider. if necessary, use jpeg.config for error handshaking with the host. table programming at power up initialization, the jpeg driver loads standard huffman tables into huffman memory. scaled versions of standard luma and chroma quantization tables and are loaded into quantization memory. the calculation of the scaled quantization table is as follows: scaled_q = (scaling_facto r * standard_q + 16) >> 5 scaling factor is bit 6:0 of jpeg driver va riables qscale1, qscale2, and qscale3. the stan- dard quantization and huffman tables are tables k.1?k.4 of the iso/iec 10918-1 speci- fication. host processor can override huffman and quantization memory with any arbitrary huffman and quantization tabl es through indirect register access. if the host chooses to use the scaled standard quantization tables, bit 4 of jpeg driver variable config must be set to ?1.? scaling fa ctor can be changed at any time. whenever it is changed, bit 7 of the corresponding jpeg dr iver variable qscale must be set to ?1,? and the new value takes effect in the next frame jpeg encoding. www.datasheet.co.kr datasheet pdf - http://www..net/
pdf: 09005aef8202ec2e/source: 09005aef8202ebf7 micron technology, inc., reserves the right to change products or specifications without notice. MT9D111__7_rev5.fm - rev. b 2/06 en 148 ?2004 micron technology, inc. all rights reserved. MT9D111 - 1/3.2-inch 2-megapixel soc digital image sensor start-up and usage micron confidential and proprietary since the quantization memory stores 3 sets (luma and chroma) of quantization tables, the one that is used for the current frame jpeg encoding is indicated in bit 7:6 of jpeg.config (quantization table id). bit 5 of jpeg.config de termines who is responsible for setting the quantization table id. if it is ?0,? the host processor must program quanti- zation table id for every jpeg compressed frame (no need to reprogram it if subsequent jpeg frames use the same quantization tables). if it is ?1,? the jepg driver sets quantiza- tion table id to ?0? at the start of jpeg ca pture (be it still or video) and automatically select next set of quantizati on tables for the subsequent frames when the current jpeg frame is unsuccessful. bit 7:6 of jpeg.config = 0, 1, and 2 indicates fi rst, second, and third set of quantization tables, respectively. error handling and handshaking when the capturing of a jpeg snapshot is un successful, the jpeg driver can be config- ured to enable encoding subsequent frames until it is successful by setting bit 2 of jpeg.config to ?1.? for capturing jpeg video, MT9D111 always encodes subsequent frames no matter what value bit 2 of jpeg.config is set to. if bit 1 of jpeg.config is ?1 ,? handshaking with the host processor at every erroneous jpeg frame is required. when jpeg status regi ster indicates that there is an error in the current jpeg frame, jpeg encoding is stopped until the host processor sets bit 3 of jpeg.config to ?1? to indicate it is ready to receive next jpeg frame. if the host processor does not respond to an erroneous jpeg frame within jpeg.timeoutframes frames, jpeg capture is terminated. if bit 1 of jpeg.config is ?0? or if there is no error in jpeg status register, no handshaking is required. the handshaking mechanism is provided so that the host processor has sufficient time to handle the erroneous jpeg frame and react upon the error condition. for example, if the jpeg status register indicates fifo ov erflow, the host processor should increase quantization value by changing quantization table scaling factor or selecting another set of the preloaded quantization tables. if spoof oversize error occurs, the host processor should increase the spoof frame size by programming registers r16 and r17 on ifp reg- ister page 2 and/or increase quantization value. start-up and usage the start-up sequence consists of the following: 1. power-up 2. hardware reset 3. configure and enable pll 4. configure pad slew rate 5. configure preview mode 6. configure and enable auto focus 7. configure capture mode 8. perform lock or capture to start the part, power up power supplies, provide an input clock, and perform a hard- ware reset. www.datasheet.co.kr datasheet pdf - http://www..net/
pdf: 09005aef8202ec2e/source: 09005aef8202ebf7 micron technology, inc., reserves the right to change products or specifications without notice. MT9D111__7_rev5.fm - rev. b 2/06 en 149 ?2004 micron technology, inc. all rights reserved. MT9D111 - 1/3.2-inch 2-megapixel soc digital image sensor start-up and usage micron confidential and proprietary power-up there are no specific requirements to the order in which different supplies are turned on. once the last supply is stable within the valid ranges specified below, follow the hard reset sequence to complete the power-up se quence. in order to minimize leakage cur- rent, all the power supplies should be turned on at the same time. analog voltage 2.8v for best image performance digital voltage 1.8v 0.1v (1.7v?1.9v) i/o voltage 1.7v?3.1v power-down before powering down the sensor, it is recommended to bypass the pll. once this is completed, the input clock (clkin) can be turned off. after clkin is off, turn off all the power supplies as shown in figure 33 on page 150. reset# should also be low at this time. note: turning the power supplies cannot be used as a method of achieving low power con- sumption. power to the sensor needs to be provided as long as the system is active. for the lowest power consumption, please refer to the standby procedure in the MT9D111 developer guide or technical note tn0934. hard reset sequence after power-up, a hard reset is required. assuming all supplies are stable, the assertion of reset# (active low) sets the device in rese t mode. the clock is required to be active when reset# is released. hence, leaving the input clock running during the reset dura- tion is recommended. after 24 clock cycles (clkin), the two-wire serial interface is ready to accept commands. reset should no t be activated while standby is asserted. a hard reset sequence to the camera can be activated by the following steps: 1. wait for all power supplies to be stable and within specification. 2. supply the sensor with an input clock. 3. assert reset# (active low) for at least 1s. 4. de-assert reset# (input clock must be running). 5. wait 24 clock cycles before using the two-wire serial interface. please refer to figure 33 on page 150 for the timing diagram. www.datasheet.co.kr datasheet pdf - http://www..net/
pdf: 09005aef8202ec2e/source: 09005aef8202ebf7 micron technology, inc., reserves the right to change products or specifications without notice. MT9D111__7_rev5.fm - rev. b 2/06 en 150 ?2004 micron technology, inc. all rights reserved. MT9D111 - 1/3.2-inch 2-megapixel soc digital image sensor start-up and usage micron confidential and proprietary figure 33: power on/off sequence notes: 1. for a safe reset to occur, clkin should be running during reset with standby low, as shown in the sequence above. 2. after reset# is high, wait 24 clkin rising edges before the two-wire serial interface com- munication is initiated. 3. after the power-up sequence, the preview st ate is reached when the firmware variable seq.state (id=1, offset=4) is eq ual to 3. this transition time varies depending on the input clock frequency and scene conditions. 4. in order to go into the firmware standby state, go to ca pture mode (also known as context b), or execute the firmware refresh/re fresh_mode commands after the power-up sequence (the preview state [seq.state=3] must be reached first). soft reset sequence a soft reset to the camera can be ac tivated by the following procedure: 1. bypass the pll, r0x65:0=0xa000, if it is currently used 2. perform mcu reset by setting r0xc3:1=0x0501 3. enable soft reset by setting r0x0d:0=0x0021. bit 0 is used for the sensor core reset while bit 5 refers to soc reset. 4. disable soft reset by setting r0x0d:0=0x0000 5. wait 24 clock cycles before using the two-wire serial interface note: no access to MT9D111 registers?both page 1 and page 2?is possible during soft reset. enable pll since the input clock frequency is unknown, the part starts with pll disabled. the default mnp values are for 10 mhz, with 80 mh z as target. for other frequencies, calcu- late and program appropriate mnp values. p ll programming and power-up sequence is as follows: 1. program pll frequency settings, r0x66-67:0 2. power up pll, r0x65:0[14] = 0 3. wait for pll settling time >150s 4. turn off pll bypass, r0x65:2[15] = 0 allow one complete frame to effect the co rrect integration time after enabling pll. note: until pll is enabled the two-wire serial inte rface may be limited in speed. after pll is enabled, the two-wire serial interface master can increase its communication speed. vdd, vddq, vaa, vaapix re s et# c lkin sc lk/ s data ( s hip) s tandby 24- c lkin ina c tive ina c tive power down power up re s et (>1 s) www.datasheet.co.kr datasheet pdf - http://www..net/
pdf: 09005aef8202ec2e/source: 09005aef8202ebf7 micron technology, inc., reserves the right to change products or specifications without notice. MT9D111__7_rev5.fm - rev. b 2/06 en 151 ?2004 micron technology, inc. all rights reserved. MT9D111 - 1/3.2-inch 2-megapixel soc digital image sensor start-up and usage micron confidential and proprietary configure pad slew program the desired slew rate for d out , pixclk, frame_valid, and line_valid at the variables, mode.fifo_conf1/2_a/b. program r1 0:1 with desired gpio slew rate and slew rate for two-wire serial interface s data and s clk . configure preview mode the default preview image size is 800 x 600, running at up to 30 fps at 80 mhz internal clock. to change the default size, program mode driver variables mode.output_width_a and mode.output_height_a and issue a refresh command, seq.cmd=5. for example, to configure 160x120 lcd rgb preview, program ? mode.output_width_a=160 ? mode.output_width_b=120 ? mode.out_format_a=0x20 ?seq.cmd=5 preview contrast, brightness, gamma, frame rate, and many other parameters can be loaded here as well. if known at this time, the user can also program capture parameters. if necessary, set up the ae/wb/af lock command here. configure capture mode when desired capture parameters are known (video, still, compression, and resolution), program the mode and othe r drivers correspondingly. perform lock or capture see "sequencer driver" on page 140 for details. standby sequence standby mode can be activated by two methods. the first method is to assert standby, which places the chip into hard standby. turning off the input clock (clkin) reduces the standby power consumption to the maximum specification of 100a at 55 c. there is no serial interface access for hard standby. the second method is activate d through the serial interface by setting r13:0[2]=1 to the register, known as the soft standby. as long as the input clock remains on, the chip allows access through the serial interface in soft standby. standby should only be activated from the preview mode (context a), and not the cap- ture mode (context b). in addition, the pll state (off/bypassed/activated) is recorded at the time of firmware standby (seq.cmd=3) and restored once the camera is out of firm- ware standby. in both hard and soft standby scenarios, internal clocks are turned off and the analog circuitry is put into a low power st ate. exit from standby must go through the same interface as entry to standby. if the in put clock is turned off, the clock must be restarted before leaving standby. if the pll is used to generate the master clock, ensure that the pll is powered down during standby be cause it uses a relatively high amount of power. by default, r101:0[13] powers down the pll when the chip enters standby mode. turn on the pll bypass (r101:0[15]=1) to prepare the pll for standby. to enter standby 1. preparing for standby a. issue the standby command to the firmware by setting seq.cmd=3 b. poll seq.state until the current state is in standby (seq.state=9) c. bypass the pll if used by setting r101:0[15]=1 www.datasheet.co.kr datasheet pdf - http://www..net/
pdf: 09005aef8202ec2e/source: 09005aef8202ebf7 micron technology, inc., reserves the right to change products or specifications without notice. MT9D111__7_rev5.fm - rev. b 2/06 en 152 ?2004 micron technology, inc. all rights reserved. MT9D111 - 1/3.2-inch 2-megapixel soc digital image sensor start-up and usage micron confidential and proprietary 2. preventing additional leakage current during standby a. set r10:1[7]=1 to prevent elevated standb y current. it controls the bidirectional pads d out , line_valid, frame_valid, pixclk, and gpio. b. if the outputs are allowed to be left in an unknown state while in standby, the current can increase. therefore, either have the receiver hold the camera out- puts high or low, or allow the camera to drives its outputs to a known state by setting r13:0[6]=1. r13:0[4] needs to remain at the default value of ?0.? in this case, some pads are high while some are low. for dual camera systems, at least one camera has to be driving the bus at any time so that the outputs are not left floating. c. for each gpio that is left floating (whi ch are set as inputs by default), configure as outputs and drive low by the setting the respective bit to ?0? in the gpio variables 0x9078, 0x9079, 0x9070, and 0x9071 (accessed via r198:1 and r200:1). for example, if all gpios are floating inputs, the following settings can be used: i. r198:1=0x9078 ii. r200:1=0x0000 iii.r198:1=0x9079 iv. r200:1=0x0000 v. r198:1=0x9070 vi. r200:1=0x0000 vii.r198:1=0x9071 viii.r200:1=0x0000 3. check if other devices sharing the gpio bus has conflicts with this arrangement a. if a gpio configured as an input is not allowed to be set as output during standby, have the external source hold its output high or low during standby. 4. putting the camera in standby a. assert standby=1. optionally, stop th e clkin clock to minimize the standby current specified in the MT9D111 data sheet. for soft standby, program standby r13:0[2]=1 instead. to exit standby 1. de-assert standby a. provide clkin clock, if it was disabled when using standby b. de-assert standby=0 if hard standby was used. or program r13:0[2]=0 if soft standby was used 2. reconfiguring output pads 3. if necessary, reconfigure the gpios back to the desired state by gpio variables 0x9078 and 0x9079. also set r10:1[7]=0 if any gpios are used as inputs. 4. issue a go_preview command to the firmware by setting seq.cmd=1 5. poll seq.state until the current state is preview (seq.state=3) the following timing requirements should be met to turn off clkin during hard standby: 1. after asserting standby, wait 1 ro w time before stopping the clock 2. restart the clock 24 clock cycles before de-asserting standby www.datasheet.co.kr datasheet pdf - http://www..net/
pdf: 09005aef8202ec2e/source: 09005aef8202ebf7 micron technology, inc., reserves the right to change products or specifications without notice. MT9D111__7_rev5.fm - rev. b 2/06 en 153 ?2004 micron technology, inc. all rights reserved. MT9D111 - 1/3.2-inch 2-megapixel soc digital image sensor start-up and usage micron confidential and proprietary figure 34: hard standby sequence standby hardware configuration while in standby, floating io signals may caus e the standby current to rise significantly. therefore, it is recommended that the following signals be maintained high or low dur- ing standby and not floating: gpio[11:0], d out [7:0], pixclk, frame_valid, and line_valid. output enable control when the sensor is configured to operate in default mode, the d out , frame_valid, line_valid, and pixclk outputs can be placed in high-z under hardware or software control, as shown in table 38. the pin transition between driven and high -z always occurs as ynchronously. output- enable control is provided as a mechanism to allow multiple sensors to share a single set of interface pins with a host controller. there is no benefit in placing the pins in a high-z while the part is in its low-power standby state. therefore, in single-sensor applications that use standby to enter and leave the standby state, programming r0x0d:0[6] = 1 is recommended. table 38: output enable control standby r0x0d:0[4] (output_dis) r0x0d:0[6] (drive_pins) output state 0 0 (default) 0 (default) driven 1 0 (default) 0 (default) high-z ?don?t care? 0 (default) 1 driven ?don?t care? 1 ?don?t care? high-z power up s e q uen c e c omplete d vdd, vddq, vaa, vaapix re s et# c lkin sc lk/ s data ( s hip) s tandby when se q .state=3, the sensor is b a c k in a c tive state wait for se q .state=9, then b ypass pll an d set all the re q uire d re g isters/ varia b les d es c ri b e d assert s tdby c lkin off c lkin on re c onfi g output an d g pio pa d s if ne c essary, then c all se q . c m d =1 wait for se q .state=3, then c all se q . c m d =3 de- assert s tdby 1 row-time 24- c lkin low power s tate www.datasheet.co.kr datasheet pdf - http://www..net/
pdf: 09005aef8202ec2e/source: 09005aef8202ebf7 micron technology, inc., reserves the right to change products or specifications without notice. MT9D111__7_rev5.fm - rev. b 2/06 en 154 ?2004 micron technology, inc. all rights reserved. MT9D111 - 1/3.2-inch 2-megapixel soc digital image sensor start-up and usage micron confidential and proprietary gpio outputs can also be tri-stated. see ?general purpose i/o? on page 162 description for details. contrast and gamma settings the MT9D111 ifp includes a block for gamma and contrast correction. a custom gamma/contrast correction table may be up loaded, or pre-set gamma and contrast set- tings may be selected. the gamma and contrast correction block uses the following 12-bit input data points to form a piecewise linear tr ansformation curve: 0, 64, 128, 256, 512, 768, 1024, 1280, 1536, 1792, 2048, 2304, 2560, 2816, 3072, 3328, 3584, 3840, and 4095. these input points have been selected to provide more detail to the low end of the curve where gamma correc- tion changes are typically the greatest. these points correspond to 8-bit output values that can be uploaded to the appropriat e registers. figure 35: gamma correction curve for simplicity, predefined gamma and cont rast tables may be selected, and the MT9D111 automatically combines these tables and upload them to the appropriate gamma correction registers. the gamma and contrast tables may be selected at mode driver (id = 7) offsets 67 and 68 (decimal) for mode a and mode b, respective ly. the gamma settings are established at bits 0?2, and the contrast setting s are established at bits 4?6. the gamma setting values are shown in table 39. s-curve the predefined contrast table values have been established by creating an "s" curve with highlight and shadow regions that blend smoothly with a linear midtone region. the slope and value of the highlight and shadow regions match the linear region at these table 39: gamma settings gamma setting definition 0 gamma = 1.0 (no gamma correction) 1 gamma = 0.56 2 gamma = 0.45 3 use user-defined gamma table g amma c orre c tion 0 50 100 150 200 250 300 0 1000 2000 3000 4000 input r g b, 12- b it output r g b, 8- b it 0.45 www.datasheet.co.kr datasheet pdf - http://www..net/
pdf: 09005aef8202ec2e/source: 09005aef8202ebf7 micron technology, inc., reserves the right to change products or specifications without notice. MT9D111__7_rev5.fm - rev. b 2/06 en 155 ?2004 micron technology, inc. all rights reserved. MT9D111 - 1/3.2-inch 2-megapixel soc digital image sensor start-up and usage micron confidential and proprietary transitions. in addition, the slope of the "s " curve is zero at the top (white) and bottom (black) points. the slope of the linear region determines how much contrast is applied; more contrast corresponds to a higher, midtone linear slope. figure 36: contrast ?s? curve the contrast values are shown in table 40. the contrast curve function is applied to the gamma curve points used (whether the gamma curve points are predefined or user-uploaded). s-curve is a function to correct image pixel values. when applied to pixel values, it typi- cally compresses dark and bright tones, wh ile stretching the midtones. figure 37 shows how input tone range is remapped to output tone range. suppose we categorize input pixel values as dark, midlevel, and bright. when no s-curve is applied, pixel values are unchanged. that is, dark tones 0..x 1 map to same dark tones 0..x 1 =y 1 , and midlevel maps to identical midlevel x 1 =x 2 , and bright maps to identical bright. when an s-curve is applied, the mapping is changed. in particular, midtones are stretched (y 1 -y 2 )>(x 1 -x 2 ), causing increase of contrast. here (y 1 -y 2 )/(x 1 -x 2 ) is a measure of contrast. value of 1 cor- responds to no change; >1 and <1 indicate contrast increase and decrease, respectively. dark tones are compressed, y 1 pdf: 09005aef8202ec2e/source: 09005aef8202ebf7 micron technology, inc., reserves the right to change products or specifications without notice. MT9D111__7_rev5.fm - rev. b 2/06 en 156 ?2004 micron technology, inc. all rights reserved. MT9D111 - 1/3.2-inch 2-megapixel soc digital image sensor start-up and usage micron confidential and proprietary figure 37: tonal mapping the contrast settings on the MT9D111 are im plemented by applying an s-curve func- tion on to the data points of the gamma cu rve. these resulting points then replace the existing gamma curve points, and the image is processed using this new contrast- enhanced gamma curve. identical s-curve is applied to all three rgb components. the s-curve is created by joining a linear midsection (often with a slope greater than one) to curved sections for highlights and shadows. the following constraints apply to the overall curve to ensure a smooth cu rve appropriate for increased contrast: 1. the first/lowest point must be (0,0) and th e last/highest point must be (1,1) (normal- ized). 2. the midsection and each of the end-curv es must intersect on the same points. 3. the slope of the midsection and each of th e end-curves must be equal at the intersec- tion points. the midsections a simple linear function of the form: y = mx + b. each of the end-curves (shadow and highlights) must be a trinomial to satisfy all boundary conditions. figure 38: contrast diagram x 1 x 2 y 1 y 2 x 1 x 2 dark mi d bri g ht dark mi d bri g ht input input output output dark mi d bri g ht y 2 y 1 contrast only 0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0 0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0 hi g hli g ht re g ion linear mi d tone re g ion s ha d ow re g ion (x 1 ,y 1 ) (x 2 ,y 2 ) www.datasheet.co.kr datasheet pdf - http://www..net/
pdf: 09005aef8202ec2e/source: 09005aef8202ebf7 micron technology, inc., reserves the right to change products or specifications without notice. MT9D111__7_rev5.fm - rev. b 2/06 en 157 ?2004 micron technology, inc. all rights reserved. MT9D111 - 1/3.2-inch 2-megapixel soc digital image sensor start-up and usage micron confidential and proprietary auto exposure two types of auto exposure are available?preview and evaluative. preview in preview ae, the driver calculates image brightness based on average luma values received from 16 programmable equal-size re ctangular windows forming a 4 x 4 grid. in preview mode, 16 windows are combined in 2 segments: central and peripheral. central segment includes four central windows. all remaining windows belong to peripheral segment. scene brightness is calculated as average luma in each segment taken with cer- tain weights. variable ae.weights[3:0] specif ies central zone weight, ae.weights[7:4] - peripheral zone weight. the driver changes ae parameters (it, gain s, and so on) to drive brightness (ae.cur- renty) to programmable target (ae.target). value of one step approach to target is defined by ae.jumpdivisor variable. expected brightness is ynew = ae.currenty+(ae.target-ae.currenty)/ ae.jumpdivisor. to avoid unwanted reaction of ae on small fluctuations of scene brightness or momen- tary scene changes, the ae driver uses temporal filter for luma and gate around ae luma target. the driver changes ae parameters only if buffered luma outsteps ae target gates. variable ae.lumabufferspeed defines buffering level. 32*ybuf1=ybuf0*(32-ae.lumabufferspe ed)+ycurr* ae.lumabufferspeed; values ae.lumabufferspeed=32 and ae.jum pdivisor=1 specify maximal ae speed. evaluative a scene evaluative ae algorithm is availabl e for use in snapshot mode. the algorithm performs scene analysis and classification wi th respect to its brightness, contrast, and composure and then decides to increase, decrease, or keep original exposure target. it makes most difference for backligh t and bright outdoor conditions. exposure control to achieve the required amount of exposure, the ae driver adjusts the sensor integration time r9:0, r12:0, gains, adc reference, and ifp di gital gains. to reject flicker, integration time is typically adjusted in increments of ae.r9_step. ae.r9_step specifies duration in row times equal to one flicker period. thus, flicke r is rejected if integration time is kept a natural factor of the flicker period. exposure is adjusted differently de pending on illumination situation. ? in extremely bright conditions, the exposure is set using r12:0, r9:0 and analog gains. r12:0 is used to achieve very short in tegration times. in this situation, r9:0=ae., r9_s tep r9:0 is set as a natural factor of ae.r9_step. analog gains are also used, but the green gain, also called virtual gain, does not exceed 2x. ae.minvirtgain limits minimal integration time and is expressed in flicker periods. ae.index indicates the current integration time expressed in the same form. ? under medium-intensity illu mination, the integration time can increase further. for any given exposure, the best signal-to-noise ratio can be typically obtained by using the longest exposure and the smallest gain setting. however, a long exposure time can slow down the output frame rate if the former exceeds the default frame rate, r9:0 > r3:0 + r6:0 + 1. integration ae.indexth23 specifies the breakpoint where ae scheme, giving preference to increasing the shutte r width, is replaced with another scheme www.datasheet.co.kr datasheet pdf - http://www..net/
pdf: 09005aef8202ec2e/source: 09005aef8202ebf7 micron technology, inc., reserves the right to change products or specifications without notice. MT9D111__7_rev5.fm - rev. b 2/06 en 158 ?2004 micron technology, inc. all rights reserved. MT9D111 - 1/3.2-inch 2-megapixel soc digital image sensor start-up and usage micron confidential and proprietary giving preference to increase in gain. ae .maxgain23 specifies maximum allowed gain in this situation. ae.virtgain indicates current green channel gain. ? in darker situations, the gain achieves ae.maxgain23 and the integration time is allowed to increase again up to ae.maxindex. ? in yet darker situations, once the integrat ion time achieves ae.maxindex, the analog gain is allowed to increase up to ae.maxvirtgain. ? in very dark conditions, the digital ifp gains are allowed to increase up to ae.maxdgainae1 and ae.maxdgainae2. adc is used as an additional gain stage by adjusting reference levels. see ae.adc* vari- ables. figure 39: gain vs. exposure lens correction zones in order to increase the precision of the co rrection function, the image plane is divided into 8 zones in each dimension. the coordinates of zone boundaries are referenced with respect to the lens center, c. each boundary as well as c (cx, cy) coordinate is stored as a byte, which represents the coordinate value divided by 4. there always three boundaries to the left (top) of the center and three to the right (bottom) of the center. these bound- aries apply uniformly for each color channel. however, the correction functions are pro- grammable independently for each color component. boundary and lens center positions are also valid for the preview mode. figure 40 illustrates the lens correction zones. ae.r9_step 2x 2 * ae.r9_step 3 * ae.r9_step 4 * ae.r9_step ae.indexth23 1x . . . . ae.maxgain23 . . . ae.maxvirtgain ae.maxdgainae1 / ae.maxdgainae2 (th23 + 1) * ae.r9_step (th23 + 2) * ae.r9_step (th23 + 3) * ae.r9_step (th23 + 4) * ae.r9_step ae.maxindex . . . no gain: integration time & shutter delay (up to 16 lines) increasing exposure time increasing gain normally set to ensure constant frame rate www.datasheet.co.kr datasheet pdf - http://www..net/
pdf: 09005aef8202ec2e/source: 09005aef8202ebf7 micron technology, inc., reserves the right to change products or specifications without notice. MT9D111__7_rev5.fm - rev. b 2/06 en 159 ?2004 micron technology, inc. all rights reserved. MT9D111 - 1/3.2-inch 2-megapixel soc digital image sensor start-up and usage micron confidential and proprietary figure 40: lens correction zones lens correction procedure the goal of the lens shading correction is to achieve a constant sensitivity across the entire image area after the correction is applied. in order to accomplish this, each incoming pixel value is multiplied with a correction function f (x, y), which is dependent on the location of the pixel. the corrected pixel data, p out , can be expressed in the fol- lowing term: (eq 1) within each zone described above, the correction function can be expressed with a fol- lowing equation, as follows: (eq 2) where (eq 3) are piecewise quadratic polynomial function s that are independent in each x and y dimension k and g are constants that can be used to increase lens correction at the image corners (k) and to offset the lc magnitude for all zones and colors (g) the expressions (eq 4) x 0 x 1 x 2 y 1 x 5 x 4 x 3 y 0 y 2 y 5 y 4 y 3 array c enter c y c x x p out xy , () = p in xy , () * f xy , () f xy , () = xx 2 , () ? yy 2 , () + k* xx 2 , () * ? xx 2 , () * ? yy 2 , () -g + xx 2 , () and ? yy 2 , () xx 2 , () and ? yy 2 , () www.datasheet.co.kr datasheet pdf - http://www..net/
pdf: 09005aef8202ec2e/source: 09005aef8202ebf7 micron technology, inc., reserves the right to change products or specifications without notice. MT9D111__7_rev5.fm - rev. b 2/06 en 160 ?2004 micron technology, inc. all rights reserved. MT9D111 - 1/3.2-inch 2-megapixel soc digital image sensor start-up and usage micron confidential and proprietary and are defined independently for each dime nsion. these can be expressed further as (eq 5) (eq 6) in order to implement the function f (x, y) for each zone the MT9D111 provides a set of registers that allow flexible definition of th e function f (x, y). these registers contain the following parameters: ? operation mode r128:2 ? zone boundaries and center offset r129:2-r135:2 ? initial conditions of (eq 7) for each color (12-bit wide) r136:2-r141:2 ? initial conditions of the first derivate of (eq 8) for each color (12-bit wide) r142:2-r147:2 ? second derivatives of (eq 9) for each color and each zone (8-bit wide) r148:2-r171:2 ? values for k(10-bit wide) and g(8-bit wide) in (2) for all colors and zones are specified in r173:2 and r174:2. sign for k is specified in r r128:2. there are x2 factor that can be applied to the second derivatives inside each zone (r172:2) if correction curvature in the particular zone is to be increased. there are also global x2 factors for all zones in x and y di rection located in r128:2. the first derivative (for both x and y directions) can be divide d by a number (devisor) specified in r128:2 before it is applied to the f function. higher numbers result in more precise curve (full- scale expanse). color correction color correction in the color pipeline is achieved by 1. apply digital gain to raw rgb, r106:110:1 2. subtract second black level d from raw rgb, see r59:1 3. multiply result by ccm, r96-102:1 xx 2 , () = a i x 2 + b i x + c i ? yy 2 , () = d i y 2 + e i y + f i xx 2 , () and ? yy 2 , () xx 2 , () and ? yy 2 , () xx 2 , () and ? yy 2 , () www.datasheet.co.kr datasheet pdf - http://www..net/
pdf: 09005aef8202ec2e/source: 09005aef8202ebf7 micron technology, inc., reserves the right to change products or specifications without notice. MT9D111__7_rev5.fm - rev. b 2/06 en 161 ?2004 micron technology, inc. all rights reserved. MT9D111 - 1/3.2-inch 2-megapixel soc digital image sensor start-up and usage micron confidential and proprietary 4. clip the result mcu controls both ccm and d; see "auto wh ite balance driver" on page 143 and "his- togram driver" on page 146. decimator in order to fit image size to customer needs, the image size of the soc can be scaled down. the decimator can reduce image to arbitrary size using filtering. the scale-down procedure is performed by transferring an incoming pixel from the image space into a decimated (scaled down) space. the procedure can be performed in both x and y dimension. all the standard formats with resolution lower than 2 megapixels as well as customer specified resolutions are supported. transfer of pixel from the image into the decimated space is done in the following way, which is the same in x and y directions: each incoming pixel is split in two parts. the first part (p1) goes into the currently formed output-space pixel while part two (p2) goes to the next pixel. p1 could be equal or less than value of the incoming pixel while p2 is always less. these two parts are obtained by multiplying the value of incoming pixel by scaling factors f1 and f2, which sum is always constant for the given deci mation degree and proportional to x1/x0 where x1 is size of the output image and x0 is the size of the input image. it is denoted as "decimation weight." coefficients f1 and f2 are calculated in the microcontroller trans- parently for user based on the specified outp ut image size and mode of soc operation. at large decimation degrees, several incoming pixels may be averaged into one deci- mated pixel. averaging of the pixels during decimation provides a low pass filter, which removes high-frequency components from the incoming image, and thus avoids alias- ing in the decimated space. the decimato r has two operational modes?normal and high-precision. since the intermediate result for y decimated pixels has to be stored in a memory buffer with certain word width, there is a need for additional precision at larger decimation degrees when scaling factors are small. this is done by increasing the num- ber of digits for each stored value when decimation is greater than 2. c 11 c 12 c 13 c 21 c 22 c 23 c 31 c 32 c 33 r raw *g r -d g raw *g g -d b raw *g b -d r g b c lip www.datasheet.co.kr datasheet pdf - http://www..net/
pdf: 09005aef8202ec2e/source: 09005aef8202ebf7 micron technology, inc., reserves the right to change products or specifications without notice. MT9D111__7_rev5.fm - rev. b 2/06 en 162 ?2004 micron technology, inc. all rights reserved. MT9D111 - 1/3.2-inch 2-megapixel soc digital image sensor general purpose i/o micron confidential and proprietary general purpose i/o introduction actuators used to move lenses in af camera s can be classified into several categories that differ significantly in their requirements for driving signals. these requirements vary also from one device to another wi thin each category. the MT9D111 has been designed to meet the needs of many different lens actuators without having a lot of hardware resources dedicated solely to that purpose. internal resources that MT9D111 brings together to control a lens actuator can be , and at least in part are, used for many other tasks, which amply justifies their presence on the chip even when no af support is required from it. this is particularly tr ue of the embedded 6811 microcontroller (mcu) with associated memory, but also of the ge neral purpose input/output module (gpio), whose description is given below. the gpio is, in essence, a programmable digital waveform generator with 12 individu- ally controllable output pads (gpio0 thro ugh gpio11), a separate power supply pad (vddgpio), and a separate clock domain. by default, the gpio clock domain is con- nected to the master clock, but it can be disconnected to save power, by writing 0 to r11:1[7]. the maximum rate at which the gpio outputs can be toggled is 1/2 of the mas- ter clock frequency. in other words, when the master clock frequency is 80 mhz, the gpio can change the state of its output pads every 25ns. this maximum rate is attain- able only when the gpio outputs pre-progra mmed periodic waveforms?a discussion of these and of differently generated arbitrary output patterns follows in the next two sec- tions. since some lens actuators provide feedback si gnals that can be used to ascertain their position, direction of motion, etc., the MT9D111 has the capability to sense such signals via digital and analog inputs. all of the gpio output pads can be individually reversed to become high-impedance digital inputs. sectio n ?digital and analog inputs? on page 144 explains how to change the direction of the gpio pads and how to sense both digital and analog input signals. the gpio is programmed via 77 8-bit registers mapped to hexadecimal addresses 0x1070?0x10b6 and 0x10b8?0x10bd in the memory space of the mcu. sixty-five of these registers and two additional registers with hexadecimal addresses 0x10be and 0x10bf return information about gpio status when re ad. like driver variables, the gpio regis- ters can be accessed by an external host processor through registers r198:1 and r200:1. since the two-wire serial interface is relati vely slow, the host processor can never access the gpio registers as fast as the embedded mcu. in gpio applications requiring exact output timing and/or fast resp onse to input signals, all time-critical writes and reads to the gpio registers should be done by the mcu. if the only task of the gpio is to move an af lens, micron strongly recommends leaving the control of the gpio entirely to afm driver (id = 6), a part of MT9D111 firmware dedicated to that task. MT9D111 users have the option to substitute their own code for the af m driver or part of it , if it does not meet their needs. gpio output control overview there are two ways to control voltages on the gpio output pads. one way, direct but not guaranteeing high timing precision, is to set or clear bits in gpio_data_l and gpio_data_h registers. both the mcu and the host processor can do it by writing to the hexadecimal addresses 0x1070?0x1077. th e first two of these provide normal, "what- you-write-is-what-you-get" access to the registers, while the remaining six provide selective access to individual register bits. th is selective access facilitates changing volt- ages on some gpio output pads without a ffecting the state of other pads?an output manipulation expected to be routine. for ex ample, to change voltage on the output pad www.datasheet.co.kr datasheet pdf - http://www..net/
pdf: 09005aef8202ec2e/source: 09005aef8202ebf7 micron technology, inc., reserves the right to change products or specifications without notice. MT9D111__7_rev5.fm - rev. b 2/06 en 163 ?2004 micron technology, inc. all rights reserved. MT9D111 - 1/3.2-inch 2-megapixel soc digital image sensor general purpose i/o micron confidential and proprietary gpio3, the user only has to write 8 to th e address 0x1073 (also known as register gpio_output_toggle_l). to do the same by writing to the register gpio_data_l, the user must know in advance the state of its third bit and all other bits corresponding to output pads. in general, writing a positive number to one of the gpio_output_* registers has the following effect: the gpio output pads corres ponding to ones in the binary representa- tion of the number are toggled, set, or clea red, while the output pads corresponding to zeros and all input pads are left alone (masked). once the gpio outputs and the gpio_data_* registers are updated, all bits in the gpio_output_* registers are auto- matically cleared. the second way to obtain a desired output from the gpio is to program into it a set of periodic waveforms, initialize their generatio n, and optionally monitor its progress. the advantage of using this way is that the gp io, once programmed and activated, generates the desired waveforms on its own, without waiting for any external stimuli, and there- fore with the best attainable timing accuracy . it is possible to override, suspend or abort this autonomous waveform generation by writ ing to appropriate gpio registers, but no register writing is necessary for the gpio to continue. if necessary, the gpio can notify the mcu about reaching certain points on th e waveform generation timeline, e.g., the first rising edge or end of a selected wavefo rm. see "notification signals" on page 165 for more details. waveform programming a large subset of the gpio registers is dedi cated to programming periodic waveforms. in designing this subset, the main concern has b een to meet the requirements of the most demanding af actuators known to date. all registers belonging to this subset have names starting with gpio_wg_, where wg stands for waveform generator. the gpio_wg_* registers allow one to individually specify up to 8 waveforms, to be output through the gpio[7:0] pads. it is not poss ible to output preprogrammed waveforms through the gpio[11:8] outputs. these outputs are controlled only by the gpio_data_h and gpio_output_*_h registers. www.datasheet.co.kr datasheet pdf - http://www..net/
pdf: 09005aef8202ec2e/source: 09005aef8202ebf7 micron technology, inc., reserves the right to change products or specifications without notice. MT9D111__7_rev5.fm - rev. b 2/06 en 164 ?2004 micron technology, inc. all rights reserved. MT9D111 - 1/3.2-inch 2-megapixel soc digital image sensor general purpose i/o micron confidential and proprietary figure 41: examples of gpio-generated waveforms of the four waveforms depicted in figure 41, the first two are examples of the most com- plex waveforms that the gpio can generate. periods of these waveforms consist of five different time intervals (subperi ods), the first four of which end with a transition to an opposite state (low-to-high or high-to-low). each waveform, w p (p = 0, 1), is com- pletely described by its initial state, s 0p , the lengths of its five subperiods, t ip (i = 0,?, 4), and the number of periods (repetitions) from the start to the end, n p . the simpler wave- forms w2 and w3 can be described using the same set of numbers, only with some of the subperiod lengths equal to 0. a vali d waveform description must include n p > 0 and at least one t ip > 0, (i.e. it must set a nonzero duration for the waveform). just one t ip > 0 gives a constant function of time, w p (t) = s0p. generating such a waveform means keep- ing a particular gpio output at low or high for the specified time. to toggle an output between low and high, one has to assign to it at least two nonzero t ip values. the s 0p values are set in the gpio_data_l register. there are two ways to store the n p and t ip values in the gpio registers gpio_wg_n* and gpio_wg_t*. the first is to allo- cate 8 bits for each value, which allows one to store values for eight waveforms. the sec- ond is to allocate 16 bits per value. when this is done across the board, one can define only up to four waveforms, to be gene rated at the gpio0, gpio2, gpio4, and gpio6 pads. however, the gpio allows users to select "8-bit counter mode" or "16-bit counter mode" individually for each of the following pairs of outputs: gpio[1:0], gpio[3:2], gpio[5:4], and gpio[7:6]. these pairs are put in the 8- or 16-bit coun ter mode by setting bits [4:7] in register gpio_wg_config to 0 or 1, respectively. the term counter mode is used here because these bits control the width of counters used in waveform generation. what is described above as allocating 8 or 16 bits per n p or t ip value in the gpio_wg_n* and gpio_wg_t* registers, is in fact done by changing co unter widths and the way register values are loaded into the counters. also, strictly speaki ng, there is a proportionality, not equality, relation between t ip values and single or coupled gpio_wg_t* register settings that represent them. hence, the statement that t ip values are stored in 8-bit or16-bit "cells" is a bit inaccurate. perhaps we should say "encoded" instead of "stored." t 10 t 30 t 20 t 40 t 01 t 22 t 02 t 00 w 0 w 1 w 2 w 3 t 11 s 00 s 01 s 02 s 03 t 03 t 13 t 12 t 41 t 31 t 21 www.datasheet.co.kr datasheet pdf - http://www..net/
pdf: 09005aef8202ec2e/source: 09005aef8202ebf7 micron technology, inc., reserves the right to change products or specifications without notice. MT9D111__7_rev5.fm - rev. b 2/06 en 165 ?2004 micron technology, inc. all rights reserved. MT9D111 - 1/3.2-inch 2-megapixel soc digital image sensor general purpose i/o micron confidential and proprietary in any case, the n p values occupy up to 8 registers (gpio_wg_n0 through gpio_wg_n7). writing an invalid n p = 0 to any of these registers is interpreted as setting this particular n p to infinity. the t ip values are fully encoded in 42 registers named gpio_wg_t*, gpio_wg_clkdiv, and gpio_wg_ clkdiv_sel. this last two registers contain, respectively, two 4-bit settings for two clock dividers and eight 1-bit switches assigning one or the other divider to each of the gpio[7:0] pads. each clock divider divides the gpio clock frequency by 2 d+1 , where d is its 4-bit setting. the gpio_wg_t* registers contain natural numbers obtained by dividing the t ip values by master clock period and by the appropriate power of 2. fo r example, suppose that the master clock period is 12.5 ns. if one decides to use the registers (and counters) in the 16-bit mode and sets the clock divider for the gpio2 output to 2 2+1 = 8, one has to write 39 to gpio_wg_t03 and 16 to gpio_wg_t02 to get t 02 = 1 ms. to obtain approximately the same t 02 in the 8-bit mode with gp io2 clock divider set to 2 8+1 = 512, one has to set the gpio_wg_t02 to 156 (since 1ms/12.5ns/512 = 156.25). bit values in registers gpio_wg_frame_sync, gpio_wg_strobe_sync and gpio_wg_chain determine the conditions th at must be met for waveform generation to begin on each of the gpio[7:0] pads. it al ways has to be enabled first by clearing an appropriate bit in gpio_wg_suspend register. depending on selections made in the gpio_wg_*_sync and gpio_wg_chain registers, the enabling is the signal to either start waveform generation immediately or on one of the following events: next falling edge of frame_valid, next raising edge of strobe or end of waveform generation on another pad. no more than one of these events should be chosen to trigger waveform generation on each particular pad. if more than one event is selected, only selection made in the highest priority register has an effect. the order of priority is, from highest to lowest, gpio_wg_chain, gpio_wg_frame_sync, gpio_wg_strobe_sync. waveform generation at any pad can be suspended and resumed at will using the gpio_wg_suspend register. suspending is like stopping the time on a particular pad. if generation on other pads continues in the meantime, synchronization between the suspended waveform and others are lost. register gpio_wg_reset contain reset bits for the gpio[7:0] outputs. setting any of them to 1 aborts ongoing waveform generation at the corresponding pad and resets the coun ters used in it. the bit must be cleared before the waveform generation can resume. notification signals the gpio can send signals to the mcu to noti fy it about two types of events: the end of waveform generation at a particular output pad (gpio[7:0]) or a transition of interest (low-to-high or high-to-low) on a particular input or output pad (gpio[11:0]). the gpio uses two kinds of notification signals in parallel: on each event of interest, it sends a wake-up signal to the mcu and it se ts to 1 the appropriate bit in register gpio_ns_status_l or gpio_ns_status_h. the bit remains set until acknowledged by writing 1 to it. the wake-up signal has no effect unless the mcu is in sleep mode. to enable notification signals from gpio, some bits in register gpio_ns_mask_l and/ or register gpio_ns_mask_h must be set to 0. by writing to the corresponding bits in registers gpio_ns_type, gpio_ns_edge_l, and gpio_n_edge_h, one can choose events that triggers the signals. digital and analog inputs all gpio pads are configurable as high-impedance digital inputs. setting or clearing bits in the gpio_dir_* registers turns the corresponding pads into outputs or inputs, respectively. the logical state of each input pad is mirrored by the state of the corre- sponding bit in the gpio_data_* registers, enabling the mcu or external host proces- sor to receive digital feedback. www.datasheet.co.kr datasheet pdf - http://www..net/
pdf: 09005aef8202ec2e/source: 09005aef8202ebf7 micron technology, inc., reserves the right to change products or specifications without notice. MT9D111__7_rev5.fm - rev. b 2/06 en 166 ?2004 micron technology, inc. all rights reserved. MT9D111 - 1/3.2-inch 2-megapixel soc digital image sensor general purpose i/o micron confidential and proprietary one of the 10-bit adcs in the MT9D111 sensor core is available to sample external volt- age signals (0.1 to 1.0v) during horizontal blan king periods, when it does not digitize sensor signal. the external signals that need to be sampled must be connected to ain1, ain2, and/or ain3 input pads. by default, these are test pads that give access to different points in the sensor analog signal chain. to connect them directly to the adc and enable signal sampling during horizont al blanking, r0xe3[15] must be set to 1. when this bit is set, 10-bit values of digiti zed ain3, ain2, and ain1 signal s are put in registers r0xe0:0, r0xe1:0, and r0xe3:0, respectively. the maximum signal sampling rate provided by this scheme is about 36000 samples per second. gpio software drivers it is likely that some MT9D111 users wants to develop their own software for controlling the gpio and, through it, their own devices. all MT9D111 firmware, in particular the afm driver controlling the gpio, has been desi gned to facilitate user modifications and additions. public driver me thods (functions) have been made easily replaceable by means of jump tables, also referred to as vi rtual method tables (vmt). public firmware variables include pointers to these tables, which in turn include pointers to driver meth- ods that users may want to replace with th eir own. to replace one or more public method of, say, the afm driver, a user must do the following: 1. load code containing replacemen t methods into the mcu ram memory 2. create in the ram a copy afm driver vmt to replace the original vmt 3. populate the replacement vmt with pointers to the replacement methods and to those original methods that need not be replaced 4. change the pointer to the afm driver vm t included among the public variables of the driver so that it points to the replacement vmt. the public vmts also make it easy for the us ers to call firmware methods from their own code. utilizing these methods may reduce user code size and shorten development time. a detailed discussion of driver requirements of various lens actuators will be added to this document later. auto focus algorithm description the af algorithm implemented in the MT9D111 seeks to maximize sharpness of vertical lines in the sensor's image output by guiding an external lens actuator to the position of best lens focus. the algorithm's implementation has a hardware component called focus measurement engine (fme) and a firmware component called af driver. the algo- rithm is lens-actuator-independent: it provides guidance by means of an abstract, 8-bit, 1-dimensional position variable, leaving the tr anslation of its changes into physical lens movements to a separate af mechanics (afm ) driver. the af algorithm relies on the afm driver and the gpio to generate digita l output signals needed to move different lens actuators. the afm driver must also corr ectly indicate at all times if the lens it con- trols is stationary or moving. this is requir ed to prevent the af driver from using line sharpness measurements distorted by concurrent lens motion. line sharpness measurements are performed continuously (in every frame) by the fme, which is a programmable edge-filtering module in image flow processor (ifp). the fme convolves two pre-programmed 1-dimensional digital filters with luminance (y) data it receives row by row from the color interpolation module. in every interpolated image, the pixels whose y values are used in the co nvolution form a rectangular block that can be arbitrarily positioned and sized, and in ad dition divided into up to 16 equal-size sub- blocks, referred to as af wi ndows or zones. the absolute values of convolution results are summed separately for each filter over each of the af windows, yielding up to 32 www.datasheet.co.kr datasheet pdf - http://www..net/
pdf: 09005aef8202ec2e/source: 09005aef8202ebf7 micron technology, inc., reserves the right to change products or specifications without notice. MT9D111__7_rev5.fm - rev. b 2/06 en 167 ?2004 micron technology, inc. all rights reserved. MT9D111 - 1/3.2-inch 2-megapixel soc digital image sensor general purpose i/o micron confidential and proprietary sums per frame. as soon as these sums or raw sharpness scores are computed, they are put in dedicated ifp registers, as are y averages from all the af windows. the af driver reduces these data to 1 normalized sharpness score per af window, by calculating for each window the ratio (s1+s2)/, where is the average y and s1 and s2 are the raw sharpness scores from the 2 filters multiplied by 128. programming of the filters into the MT9D111 includes specifying their relative weights, so each ratio can be called a weighted average of two equally normalized sharpness scores from the same af window. in addition to unequal weighting of the filt ers, the af driver permits unequal weighting of the windows, but window weights are not included in the normalized sharpness scores, for a reason that will soon become clear. there are several motion sequences through which the af driver can bring a lens to best focus position. an example sequence is depicted in figure 42. all these sequences begin with a jump to a preselected start position, e. g. the infinity focus position. this jump is referred to as the first flyback. it is followed by a unidirectional series of steps that puts the lens at up to 19 preselected positions diff erent from the start position. this series of steps is called the first scan. before and during this scan, the lens remains at each preselected position long enough for the af driver to obtain valid sharpness scores. typically, the time needed is no longer than 1 frame, but there is an option to skip 1 frame before the af driver grabs the scores, so the total time spent at each position can reach 2 frames. the timing of lens move- ments between the preselected positions is lens-actuator-dependent and not controlled by the af driver. though the af driver gives commands to move the lens, it is the afm driver that takes care of their execution and determines how soon after each command the af driver gets a signal to proceed. all incl ined sections of the lens position plot in figure 42 are therefore of unknown duration?u nless the af algorithm discussion is nar- rowed to a specific use case. figure 42: search for best focus figure 42 shows lens movements during dual /triple-flyback auto focusing sequence. the depicted sequence is just an example an d can be changed in a number of ways. sec- ond scan, as well as second and third flybac k are optional?final lens positioning can be lens position p=255 p=0 1 st s c an: the lens steps throu g h its motion ran g e, sharpness s c ores are a cq uire d after ea c h step. final lens positionin g (if no 2 n d s c an) final lens positionin g (after 2n d s c an) 1 st fly b a c k 2 n d fly b a c k 2 n d s c an (optional) 3 r d fly b a c k time best fo c us position www.datasheet.co.kr datasheet pdf - http://www..net/
pdf: 09005aef8202ec2e/source: 09005aef8202ebf7 micron technology, inc., reserves the right to change products or specifications without notice. MT9D111__7_rev5.fm - rev. b 2/06 en 168 ?2004 micron technology, inc. all rights reserved. MT9D111 - 1/3.2-inch 2-megapixel soc digital image sensor general purpose i/o micron confidential and proprietary a direct jump from last position tried in a scan to best focus position. number of steps in each scan, lens positions stepped through during the first scan, and step size in the sec- ond scan are all individually programmable. the first normalized score from each af window, acquired at the start position, is stored as both the worst (minimum) and best (m aximum) score for that window. these two extreme scores are then updated as the lens moves to subsequent positions and a new maximum position is memorized at every update of the maximum score. in effect, the preselected set of lens positions is scanned for maxima of the normalized sharpness scores, while at the same time information needed to validate each maximum is being collected. this information is in the di fference between the maximum and the mini- mum of the same score. a small difference in their values indicates that the score is not sensitive to the lens position and therefore its observed extrema are likely determined by random noise. on the other hand, if the score varies a lot with the lens position, its max- imum is much more likely to be valid, i.e. close to the true sharpness maximum for the corresponding af window. due to these cons iderations, the af driver ignores the max- ima of all sharpness scores whose peak-to-trou gh variation is below a preset percentage threshold. the remaining maxima, if any, ar e sorted by position and used to build a weight histogram of the scanned positions. th e histogram is build by assigning to each position the sum of weights of all af windows whose normalized sharpness scores peaked at that position. the position with the highest weight in the histogram is then selected as the best lens position. this method of selecting the best position may be compared to voting. the voting enti- ties are the af windows, i.e. different image zones. depending on the imaged scene, they may all look sharp at the same lens position or at different ones. if all the zones have equal weight, the lens position at which a si mple majority of them looks sharp is voted the best. if the weights of the zones are unequal, it means that making some zones look sharp is more important than maximizing the entire sharp-looking area in the image. if there are no valid votes, because sharpness scores from all the af windows vary too little with the lens position, the af driver arbitrarily chooses the start position as the best. figure 43, figure 44 and figure 45 illustrate selection of best lens position when there are several objects in imaged scene to focus on, each at a different distance from the lens. each lens position bringing one or more of these objects into shar p focus within the af window grid can be potentially voted the best. the actual result of the vote is determined by the extent and texture of each object and the weights of the overlying af windows. what happens after the first scan and ensuin g selection of best position is user-pro- grammable?the af algorithm gives the user a number of ways to proceed with final lens positioning. the user should select a way that best fits the magnitude of lens actua- tor hysteresis and desired lens proximity to the truly optimal position. actuators with large, unknown or variable hysteresis should do a second flyback, i.e. jump back to the start position of the first scan, and then eith er retrace the steps made during the scan or directly jump to the best of the scanned po sitions. actuators with constant hysteresis (like gear backlash) can be moved to that posi tion directly from th e end position of the scan?the af algorithm offers an option to automatically increase the length of this move by a pre-programmed backlash-compensating step. finally, if the first scan is coarse relative to the positioning precision of the lens actuator and depth of field of the lens, an optional second fine scan can be pe rformed around the lens position selected as best after the first scan. the second scan is done in the same way as the first, except that the positions it covers are not preset. instead, the af algorithm user must preset step size and number of steps for the second scan and enable its execution by setting the appropriate control bit in one of af driver variables. finding this bit equal to 1 at the end of the first scan, the af driver www.datasheet.co.kr datasheet pdf - http://www..net/
pdf: 09005aef8202ec2e/source: 09005aef8202ebf7 micron technology, inc., reserves the right to change products or specifications without notice. MT9D111__7_rev5.fm - rev. b 2/06 en 169 ?2004 micron technology, inc. all rights reserved. MT9D111 - 1/3.2-inch 2-megapixel soc digital image sensor general purpose i/o micron confidential and proprietary calculates lens positions to be tried in the second scan from its 2 user-set parameters and the position found best in the first sc an. the calculation takes into account where that position is relative to the limits of the lens motion range and how it would be reached if the second scan were not enabled. if the user-selected way to reach it includes the second flyback, the af driver assumes that the start position of the second scan must likewise be reached not directly from end position of the first scan, but via logical posi- tion 0, the default start positi on of that scan. an extra zero is therefore put at the begin- ning of the list of positions calculated for th e second scan?unless this list already starts with logical position 0. if the second flyback is not enabled, no extra zero is prepended to the list. in every case, the list is then append ed to the list of positions already scanned in the first scan. the combined list cannot have more than 20 entries, due to fixed 20-byte size of memory buffer used by the af driver to store lens positions. this means that the first scan of, say, 15 positions can be followed by a flyback to 0 and second scan of no more than 4 non-zero positions or, alternatively, a second scan of up to 5 non-zero posi- tions if the second flyback is not enabled. in both cases, the 2 unidirectional scans can be also seen as a single scan with 2 changes of direction. if the lens actuator has signifi- cant hysteresis, the effect of those changes should be carefully considered. the only way to alleviate it is to do the flyback to 0 prior to the second change. the second scan is always followed by the user-selected final positioning sequence that in the absence of the second scan would follow the first scan, e.g. a flyback to the start position of the latter and a jump to the position found best in the former. www.datasheet.co.kr datasheet pdf - http://www..net/
pdf: 09005aef8202ec2e/source: 09005aef8202ebf7 micron technology, inc., reserves the right to change products or specifications without notice. MT9D111__7_rev5.fm - rev. b 2/06 en 170 ?2004 micron technology, inc. all rights reserved. MT9D111 - 1/3.2-inch 2-megapixel soc digital image sensor general purpose i/o micron confidential and proprietary figure 43: scene with two potential focu s targets at differ ent distances from camera figure 43 shows a simple scene with two potent ial focus targets: a business card in front and a picture of a cat far in the background. distances in the diagram are not to scale. red and yellow rectangles in the middle of th e image represent 16 af windows, each of which yields a separate y-normalized sharpness score. sharpness scores from the lower 8 windows are highest when the business card is in focus, which happens when the lens is at position 5. scores from the upper 8 windows peak when the lens is at position 0. see figure 45. 0 1 2 3 4 5 6 7 8 9 ima g e s en s or bu s ine ss c ard c at pi c ture len s opti c al axi s len s po s . # : www.datasheet.co.kr datasheet pdf - http://www..net/
pdf: 09005aef8202ec2e/source: 09005aef8202ebf7 micron technology, inc., reserves the right to change products or specifications without notice. MT9D111__7_rev5.fm - rev. b 2/06 en 171 ?2004 micron technology, inc. all rights reserved. MT9D111 - 1/3.2-inch 2-megapixel soc digital image sensor general purpose i/o micron confidential and proprietary figure 44: dependence of luminanc e-normalized loca l sharpness scores on lens position figure 44 shows luminance-normalized shar pness scores from af windows w12, w13, w32, w42, and w43 in figure 43. lens position 0 is the position of best focus for win- dows w12 and w13, while windows w42 and w43 are in sharpest focus at lens position 5. relatively featureless window w32 is in shar pest focus at the same position, but it is difficult to determine this from its sharpness score, which varies very little with lens position. figure 45: example of position we ight histogram created by af driver 0 20 40 6 0 80 100 120 012345 6 789 lens position num b er normalize d s harpness sc ore w12 w13 w32 w42 w43 0 1 2 3 4 5 6 7 8 9 wei g ht lens position num b er w21 w14 w13 w24 w12 w11 w22 w23 w41 w44 w43 w42 w34 w32 w31 w33 three af win d ows ex c lu d e d from histo g ram b e c ause of very low varia b ility of their sharpness s c ores with lens position 3 2 1 0 www.datasheet.co.kr datasheet pdf - http://www..net/
pdf: 09005aef8202ec2e/source: 09005aef8202ebf7 micron technology, inc., reserves the right to change products or specifications without notice. MT9D111__7_rev5.fm - rev. b 2/06 en 172 ?2004 micron technology, inc. all rights reserved. MT9D111 - 1/3.2-inch 2-megapixel soc digital image sensor general purpose i/o micron confidential and proprietary figure 45 shows an example of position weight histogram created by af driver to select best lens position. this histogram corresponds to the situation depicted in figure 43 and figure 44. after scanning 10 lens positions numbered 0 through 9, the af driver deter- mined that y-normalized sharpness scores from the upper 8 of 16 af windows (w11 through w24) peak at lens position 0, while the scores from the lower 8 windows (w31 through w44) at lens position 5. for each of the 2 positions, the af driver summed pre- programmed weights of the af windows being clearly in focus at that position, thus obtaining 2 position weights. these weights would have been equal if not for very weak dependence of sharpness scores from wind ows w31, w32, and w33 on lens position. finding peak-to-trough variability of these scores lower than pre-programmed thresh- old, the af driver concluded that for w31, w32, and w33 no lens position was clearly optimal, and therefore the weights of these windows should not be added to the weight of position 5. this gave position 0 a higher weight and decided its selection as the best position. note: unequal weighting of the af windows, increasing the importance to the 4 central ones. evaluation of image sharpness information on image sharpness that the af algo rithm uses to find best focus position is provided by focus measurement engine (fme), a programmable edge-filtering module in image flow processor (ifp). the fme convolves 2 pre-programmed 1-dimensional digital filters with luminance (y) data that it receives row by row from the color interpo- lation module. for each interpolated frame, the convolution of the af filters with y pro- duces up to 32 local sharpness scores reflec ting the density and sharpness of vertical edges in up to 16 user-selected areas of the frame. the fme outputs these sharpness scores once every frame to ifp registers r[77:84]:2.and r[87:94]:2 (where "[:]" denotes a range of register numbers and ":2" means pa ge 2). in addition, the fme calculates and writes to ifp registers r[67:74]:2 up to 16 loca l averages of y that ca n be used to normal- ize the sharpness scores and thus make them nearly independent of scene brightness. since each sharpness score and y average has on ly 8 register bits allocated for it, care should be taken in programming the af filters to ensure that the sharpness scores they produce never exceed 255. otherwise, the co ntent of registers r[77:84]:2.and r[87:94]:2 may not match actual sharpness scores computed by the fme. the exact method of computing the sharpness scores is as follows. sixteen equal size rectangular windows forming a 4 x 4 grid are superimposed on each color-interpolated frame. the size of these af windows and the position of the upper left corner of the grid are programmable (via ifp registers [r64:66]:2). the grid does not have to be entirely inside the frame. for example, it is perfectl y legal to cover most of the frame with a 3x3 portion of the grid and place the remaining 7 af windows almost entirely outside of it, as shown in figure 46. whenever a portion of an af window is inside the frame, the fme calculates 2 sharpness scores and average y fo r this portion. however, it can write these results to registers only if the bottom boundary of the window is partly or fully inside the frame. placing this boundary entirely outs ide the frame makes the window inactive, in the sense that the fme stops outputting new sharpness scores and y averages for it. although no af window having some part of the bottom boundary inside the frame can be deactivated in the same sense, any af wind ow can be made irrelevant in the af algo- rithm by giving it a weight of zero. each frame is read out from the sensor core and processed by the ifp row by row. every rectangular block of pixels in the frame can be considered as a separate, smaller frame, also read out and processed row by row. thin king this way about the af windows, refer to a portion of a frame row belonging to any af window as a window row. as the color interpolation module processes each window row and makes y values of its successive pixels available to the fme, the fme convolves those values with the 2 af filters. the af www.datasheet.co.kr datasheet pdf - http://www..net/
pdf: 09005aef8202ec2e/source: 09005aef8202ebf7 micron technology, inc., reserves the right to change products or specifications without notice. MT9D111__7_rev5.fm - rev. b 2/06 en 173 ?2004 micron technology, inc. all rights reserved. MT9D111 - 1/3.2-inch 2-megapixel soc digital image sensor general purpose i/o micron confidential and proprietary filters are user-programmable within the following constraints: each can have 8 or 9 integer coefficients with values from -15 to 15, can be symmetric or antisymmetric, and can be multiplied by a power-of-2 weight factor ranging from 1/512 to 32. by default, both are programmed to detect sharp edges, bu t the first filter is more high-pass than the second. each filter is applied to successive locations in a window row, starting at the first pixel and ending at the last. this requires using y values from outside the window, specifically from the 4 columns to the left and 4 columns to the right of the window. hence, when programming the size and posi tion of the af window grid, one should make sure that every af window intended to have non-zero weight is at least than 4 col- umns away from the left an d right side of the frame. figure 46: auto focus windows figure 46 shows an array of 16 equal-size af windows configured to work like a centered quincunx pattern of 5 windows. as the convolution of each af filter with y progresses along a window row, then to the next row, and so on, absolute values of its successive results are added to a sum that ulti- mately becomes a sum over the whole portion of the window located inside the frame. at the same time, the pixels in the window are counted and their y values are added up to get the average y for the window. in this way, schematically depicted in figure 47, each af window not located fully out- side the frame yields 2 sharpness scores (the sums of convolution results from the 2 af filters) and 1 average y. the number of window rows processed to obtain these results can be equal to or less than the common af window height programmed into the regis- ter r65:2. if and only if the window row count matches that height, the results are output to registers. this never happens for af windows positioned like w41 or w44 in figure 46?hence these windows are inactive. results from each active af window are output immediately after it s last row is processed. w11 w12 w13 w14 w21 w22 w23 w24 w31 w32 w33 w34 w41 w42 w43 w44 use d a c tive win d ow (pro g ramma b le wei g ht > 0) unuse d a c tive win d ow (pro g ramma b le wei g ht = 0) ina c tive win d ow (partly outsi d e the frame, no sharpness s c ore c al c ulate d ) frame h w pro g ramma b le (x,y) pro g ramma b le win d ow size (w,h) www.datasheet.co.kr datasheet pdf - http://www..net/
pdf: 09005aef8202ec2e/source: 09005aef8202ebf7 micron technology, inc., reserves the right to change products or specifications without notice. MT9D111__7_rev5.fm - rev. b 2/06 en 174 ?2004 micron technology, inc. all rights reserved. MT9D111 - 1/3.2-inch 2-megapixel soc digital image sensor general purpose i/o micron confidential and proprietary figure 47: computation of sharpne ss scores and luminance average for an af window figure 47 shows the computation of sharpness scores and average luminance in an af window. coefficients of the two af filters are programmable. the filters shown here as an example yield convolution results f 1 = 2y 2 - 8y 3 + 12y 4 - 8y 5 + 2y 6 and f 2 = 2y 0 - 8y 2 + 12y 4 - 8y 6 + 2y 8 . the symmetry constraint placed on the af filters reduces the number of coefficient val- ues needed to define them. symmetric 8- or 9- coefficient filters are defined by specifying 4 or 5 coefficient values, respectively. only 4 coefficients are needed to define an 8- or 9- coefficient antisymmetric filter. examples of af filters that can be programmed into MT9D111 are given in table 41. to program the fi rst af filter, one must write its parame- ters to ifp registers r75:2 and r76:2. the para meters of the second af filter must be written to ifp registers r85:2 and r86:2. . table 41: examples of af filters that can be programmed into the MT9D111 filter parameters programmed into registers filter filter size filter symmetry filter coefficients filter weight c0 c1 c2 c3 c4 8 symmetric n/a 6 -7 2 0 1 [0 2 -7 6 6 -7 2 0] 8 antisymmetric n/a 1 0 0 0 1/4 [0 0 0 -1/4 1/4 0 0 0] 9 symmetric 6 0 -4 0 1 2 [2 0 -8 0 12 0 -8 0 2] 9 antisymmetric 0 15 5 0 0 1/8 [0 0 -5/8 -15/8 0 15/8 5/8 0 0] row r+1 0 0 2 -8 12 -8 2 0 0 y 0 y 1 y 2 y 3 y 4 y 5 y 6 y 7 y 8 y 9 ? row r-1 af filter 1: af filter 2: pixel y data: ifp re g i s ter s |f1| |f2| af window row r row r-2 row r+2 2 0 -8 0 12 0 -8 0 2 pixels in win d ow s 1 = |f1| pixels in win d ow s 2 = |f2| pixels in win d ow n pixels in win d ow y www.datasheet.co.kr datasheet pdf - http://www..net/
pdf: 09005aef8202ec2e/source: 09005aef8202ebf7 micron technology, inc., reserves the right to change products or specifications without notice. MT9D111__7_rev5.fm - rev. b 2/06 en 175 ?2004 micron technology, inc. all rights reserved. MT9D111 - 1/3.2-inch 2-megapixel soc digital image sensor spectral characteristics micron confidential and proprietary spectral characteristics figure 48: typical spectral characteristics die outline figure 49: optical center offset note: figure no t to scale. 0 5 10 15 20 25 30 35 40 350 400 450 500 550 6 00 6 50 700 750 blue g reen re d quantum effi c ien c y vs. wavelen g th wavelen g th (nm) quantum effi c ien c y ( % ) last c lear pixel ( c ol 1 6 83, row 1235) first c lear pixel ( c ol 52, row 20) opti c al c enter (1 6 7.84 m, 2.0 6 m) die c enter (0 m, 0 m) 7845.05 m ( b are d ie) 8199.35 m ( b are d ie) pll www.datasheet.co.kr datasheet pdf - http://www..net/
pdf: 09005aef8202ec2e/source: 09005aef8202ebf7 micron technology, inc., reserves the right to change products or specifications without notice. MT9D111__7_rev5.fm - rev. b 2/06 en 176 ?2004 micron technology, inc. all rights reserved. MT9D111 - 1/3.2-inch 2-megapixel soc digital image sensor electrical specifications micron confidential and proprietary electrical specifications recommended die operating temperature range is from -20 to +55c. the sensor image quality may degrade above +55c. table 42: ac electrical characteristics symbol definition conditions min typ max units f clkin1 input clock frequency pll enabled (mclk max = 80 mhz) 61064mhz t clkin1 input clock period pll enabled (mclk max = 80 mhz) 15.625 100 166.7 ns f clkin2 input clock frequency pll disabled 6 80 mhz t clkin2 input clock period pll disabled 12.5 166.7 ns t r input clock rise time 0.5 1 v/ns t f input clock fall time 0.5 1 v/ns clock duty cycle 40 50 60 % f pixclk pixclk frequency default mhz t pd pixclk to data valid default -3 3 ns t pfh pixclk to fv high default -3 3 ns t plh pixclk to lv high default -3 3 ns t pfl pixclk to fv low default -3 3 ns t pll pixclk to lv low default -3 3 ns c in input pin capacitance 3.5 pf c load load capacitance 15 20 pf ac setup conditions f clkin1 664mhz v dd 1.7 1.8 1.95 v v dd q 1.7 2.8 3.1 v v aa 2.5 2.8 3.1 v vaapix 2.5 2.8 3.1 v v dd pll 2.5 2.8 3.1 v output load 15 www.datasheet.co.kr datasheet pdf - http://www..net/
pdf: 09005aef8202ec2e/source: 09005aef8202ebf7 micron technology, inc., reserves the right to change products or specifications without notice. MT9D111__7_rev5.fm - rev. b 2/06 en 177 ?2004 micron technology, inc. all rights reserved. MT9D111 - 1/3.2-inch 2-megapixel soc digital image sensor electrical specifications micron confidential and proprietary notes: 1. due to the influence of se veral variables (scene illuminati on, output load) max values are not available. table 43: dc electrical definitions and characteristics symbol definition conditions min typ max units note v dd core digital voltage 1.7 1.8 1.95 v v dd q i/o digital voltage 1.7 2.8 3.1 v v ddgpio gpi/o digital voltage 1.7 2.8 3.1 v v aa analog voltage 2.5 2.8 3.1 v vaapix pixel supply voltage 2.5 2.8 3.1 v v dd pll pll supply voltage 2.5 2.8 3.1 v v ih input high voltage v dd q = 2.8v 2.4 v dd q+0.3 v v dd q = 1.8v 1.4 v dd q+0.3 v il input low voltage v dd q = 2.8v gnd-0.3 0.8 v v dd q = 1.8v gnd-0.3 0.5 i in input leakage current n o pull-up resistor; v in = v dd q or d gnd -10 +/-0.5 10 a v oh output high voltage at specified i oh v dd q-0.4 v v ol output low voltage at specified i ol 0.4 v i oh output high current at specified v oh = v dd q~400 m v at 1.7v v dd q -7 x ma i ol output low current at specified v ol ~400mv at 1.7v v dd q 7xma i o z tri-state output leakage current vin =v dd q or gnd -10 +/-0.5 10 a i dd 1 digital operating current context b, 1600x1200, j peg on, mclk=max, pixclk=max 92 110 ma i dd q1 i/o digital operating cu rrent context b, 1600x1200, j peg on, mclk=max, pixclk=max 1.5 ma 1 i aa 1 analog operating current context b, 1600x1200, j peg on, mclk=max, pixclk=max 43 55 ma iaapix1 pixel supply current context b, 1600x1200, j peg on, mclk=max, pixclk=max 2.1 3.5 ma iddpll1 pll supply current context b, 1600x1200, j peg on, mclk=max, pixclk=max 2.3 3 ma i dd 2 digital operating current context a, 800x600, no j peg, mclk=max, pixclk=max 48 60 ma i dd q2 i/o digital operating curre nt context a, 800x600, no j peg, mclk=max, pixclk=max 15 ma 1 iaa2 analog operating current context a, 800x600, no j peg, mclk=max, pixclk=max 27 35 ma iaapix2 pixel supply current context a, 800x600, no j peg, mclk=max, pixclk=max 45.5ma iddpll2 pll supply current context a, 800x600, no j peg, mclk=max, pixclk=max 2.3 3 ma istdby1 standby current pll enable d pll enabled (mcl k = 0hz, held at either vil or vih) 35 100 a istdby2 standby current pll disa bled pll disabled (mclk = 0hz, held at vil or vih) 35 100 a www.datasheet.co.kr datasheet pdf - http://www..net/
pdf: 09005aef8202ec2e/source: 09005aef8202ebf7 micron technology, inc., reserves the right to change products or specifications without notice. MT9D111__7_rev5.fm - rev. b 2/06 en 178 ?2004 micron technology, inc. all rights reserved. MT9D111 - 1/3.2-inch 2-megapixel soc digital image sensor electrical specifications micron confidential and proprietary note: 1 stresses above those listed may cause permanent damage to the device. this is a stress rating only, and functional operation of the device at thes e or any other condi- tions above those indicated in the product sp ecification is not implied. exposure to absolute maximum rating conditions for exte nded periods may affect device reliabil- ity. i/o timing figure 50: i/o timing diagram table 44: absolute maximum ratings symbol parameter min max unit v dd digital power -0.3 2.4 v v dd q i/o power -0.3 4.0 v v dd pll pll power -0.3 4.0 v v aa analog power (2.8v) -0.3 4.0 v vaapix pixel array power -0.3 4.0 v v in dc input voltage -0.3 v dd q+0.3 v v out dc output voltage -0.3 v dd q+0.3 v t op operation temperature -30 70 c t stg 1 storage temperature -40 85 c c lkin pix c lk t r t f t c lkin data(7:0) frame vali d / line vali d xxx xxx xxx xxx xxx xxx note: frame_vali d lea d s line_vali d b y 6 pix c lks. note: frame_vali d trails line_vali d b y 6 pix c lks. t c p t pfl t pll t pd t pd t pfh t plh pxl_0 pxl_1 pxl_2 pxl_n * pll d isa b le d for t c p www.datasheet.co.kr datasheet pdf - http://www..net/
? 8000 s. federal way, p.o. box 6, boise, id 83707-0006, tel: 208-368-3900 prodmktg@micron.com www.micron.com customer comment line: 800-932-4992 micron, the m logo, and the micron logo are tr ademarks of micron technology, inc. all other trademarks are the prope rty of their respective owners. this data sheet contains minimum and maximum limi ts specified over the complete power supply and temperature range for production devices. although considered final, these specifications are subject to change, as further product developm ent and data characterization sometimes occur. MT9D111 - 1/3.2-inch 2-megapixel soc digital image sensor packaging micron confidential and proprietary pdf: 09005aef8202ec2e/source: 09005aef8202ebf7 micron technology, inc., reserves the right to change products or specifications without notice. MT9D111__7_rev5.fm - rev. b 2/06 en 179 ?2004 micron technology, inc. all rights reserved. packaging figure 51: 64-b all icsp package mechanical drawing all dimensions in millimeters. s eatin g plane 9.000 0.075 3.50 3.50 4.50 0.05 en c ap s ulant: epoxy ima g e s en s or die lid material: boro s ili c ate g la ss 0.40 thi c kne ss opti c al area pa c ka g e c enter opti c al c enter 1.35 0.10 0.40 0.950 0.075 7.20 c tr 7.00 4.48 c tr 6 .80 c tr 3.3 6 c tr 4.498 0.075 4.50 0.05 1.00 typ 9.000 0.075 0.375 0.050 1 0.575 0.050 1 0.175 (for referen c e only) c l c l 7.00 s ub s trate material: pla s ti c laminate s older ball material: 6 2 % s n, 3 6% p b , 2 % a g or 9 6 .5 % s n, 3 % a g , 0.5 % c u non s older ma s k defined ball pad s : ?0.40 maximum rotation of opti c al area relative to pa c ka g e ed g e s : 1o 0.10 a a b ball a1 id ball a1 ball a8 6 4x ?0.55 dimen s ion s apply to s older ball s po s t reflow. the pre-reflow diameter i s 0.50. 1.00 typ fir s t c lear pixel maximum tilt of opti c al area relative to pa c ka g e ed g e 0.3o. maximum tilt of opti c al area relative to top of c over g la ss : 0.3 o b 4. 66 8 0.075 0.002 (for referen c e only) 0.1 6 8 (for referen c e only) note: 1. the s e dimen s ion s are non-a cc umulative. www.datasheet.co.kr datasheet pdf - http://www..net/
pdf: 09005aef8202ec2e/source: 09005aef8202ebf7 micron technology, inc., reserves the right to change products or specifications without notice. MT9D111__7_rev5.fm - rev. b 2/06 en 180 ?2004 micron technology, inc. all rights reserved. MT9D111 - 1/3.2-inch 2-megapixel soc digital image sensor appendix a: two-wire serial register interface micron confidential and proprietary appendix a: two-wire serial register interface this section describes the two-wire serial in terface bus that can be used in any func- tional sensor mode. the two-wire serial interface bus enables r/ w access to control and status registers within the sensor core. the interface protocol uses a master/slave model in which a master controls one or more slave devices. the sensor acts as a slave device. the master generates a clock (s clk ) that is an input to the sensor and used to synchronize transfers. the master is responsi- ble for driving a valid logic level on s clk at all times. data is transferred between the master and the slave on a bidirectional signal (s data ). both the s data and s clk signal are pulled up to v dd off-chip by a 1.5k resistor. either the slave or master device can drive the s data line low?the interface protocol determines which device is allowed to drive the s data line at any given time. protocol the two-wire serial interface bus defines the transmission codes as follows: ?a start bit ? the slave device 8-bit address ? a(an) (no) acknowledge bit ? an 8-bit message ?a stop bit sequence a typ ical read or write sequence is executed as follows: 1. the master sends a start bit. 2. the master sends the 8-bit slave device addr ess. the last bit of the address determines if the request is a read or a write, where a ?0? indicates a write and a ?1? indicates a read. 3. the slave device acknowledges receipt of the address by sending an acknowledge bit to the master. 4. if the request is a write, the master then tr ansfers the 8-bit register address, indicating where the write takes place. 5. the slave sends an acknowledge bit, indica ting that the register address has been received. 6. the master then transfers the data, 8 bits at a time, with the slave sending an acknowl- edge bit after each 8 bits. the sensor core uses 16-bit data for its intern al registers, thus requiring two 8-bit trans- fers to write to one register. after 16 bits are transferred, the register address is automati- cally incremented so that the next 16 bits ar e written to the next register address. the master stops writing by sending a start or stop bit. a typical read sequence is executed as follows. 1. the master sends the write-mode slave address and 8-bit register address, just as in the write request. 2. the master then sends a start bit and the read-mode slave address, and clocks out the register data, 8 bits at a time. 3. the master sends an acknowledge bit after each 8-bit transfer. the register address is auto-incremented after ever y 16 bits is transferred. 4. the data transfer is stopped when the master sends a no-acknowledge bit. www.datasheet.co.kr datasheet pdf - http://www..net/
pdf: 09005aef8202ec2e/source: 09005aef8202ebf7 micron technology, inc., reserves the right to change products or specifications without notice. MT9D111__7_rev5.fm - rev. b 2/06 en 181 ?2004 micron technology, inc. all rights reserved. MT9D111 - 1/3.2-inch 2-megapixel soc digital image sensor appendix a: two-wire serial register interface micron confidential and proprietary bus idle state the bus is idle when both the data and clock lines are high. control of the bus is initiated with a start bit, and the bus is released with a stop bit. only the master can generate start and stop bits. start bit the start bit is defined as a high-to-low data line transition while the clock line is high. stop bit the stop bit is defined as a low-to-high data line transition while the clock line is high. slave address the 8-bit address of a two-wire serial interfac e device consists of seven bits of address and one bit of direction. a ?0? in the lsb (lea st significant bit) of the address indicates write mode, and a ?1? indicates read mode. th e default slave addresses used by the sen- sor core are 0xba (write address) and 0x bb (read address). r0x0d:0[10] or the s addr pin can be used to select the alternate slave a ddresses 0x90 (write address) and 0x91 (read address). writes to r0x0d:0[10] are inhibited when the standby pin is asserted (all other writes proceed normally). this allows two sensors to co-exist as sl aves on this interface, but they must be addressed independently. enable this capability as follows: after reset, both sensors use the default slave address. reads or writes on the serial reg- ister interface to the default slave address are decoded by both sensors simultaneously. 1. after reset, assert the standby signal to one sensor and negate the standby signal to the other sensor. 2. perform a write to r0x0d:0 with bit 10 set. the sensor with standby asserted ignores the write to bit 10 and continues to decode at the default slave address. the sensor with standby negated has its r0x0 d:0[10] set and responds to the alternate slave address for all subsequent read an d write operations, as shown in table 45. data bit transfer one data bit is transferred during each clock pulse. the serial interface clock pulse is provided by the master. the data must be stable during the high period of the two-wire serial interface clock?it can only change when the serial clock is low. data is transferred eight bits at a time, followed by an acknowledge bit. table 45: slave address options s addr r0xd:0[10] slave address write read 0 0 0x090 0x091 01 0x0ba0x0bb 100x0ba0x0bb 1 1 0x090 0x091 www.datasheet.co.kr datasheet pdf - http://www..net/
pdf: 09005aef8202ec2e/source: 09005aef8202ebf7 micron technology, inc., reserves the right to change products or specifications without notice. MT9D111__7_rev5.fm - rev. b 2/06 en 182 ?2004 micron technology, inc. all rights reserved. MT9D111 - 1/3.2-inch 2-megapixel soc digital image sensor appendix a: two-wire serial register interface micron confidential and proprietary acknowledge bit the master generates the acknowledge clock pu lse. the transmitter (which is the master when writing, or the slave when reading) re leases the data line, and the receiver indi- cates an acknowledge bit by pulling the data line low during the acknowledge clock pulse. no-acknowledge bit the no-acknowledge bit is generated when the data line is not pulled down by the receiver during the acknowledge clock pulse. a no-acknowledge bit is used to terminate a read sequence. page register the MT9D111 two-wire serial interface and it s associated protocols support an address space of 256 16-bit locations. this address sp ace is extended by a 3-bit page prefix, and controlled through accesses to r0xf0:0. the paging mechanism is intended to allow access to other sets of registers when the sensor is embedded as part of a more comple x integrated subsystem, for example, in an soc. all registers within the sensor core are accessible on page 0 (the default page). sample write and read sequences 16-bit write sequence a typical write sequence for writing 16 bits to a register is shown in figure 52. a start bit given by the master starts the sequence, followed by the write address. the image sensor then sends an acknowledge bit and expects the register address to come first, followed by the 16-bit data. after each 8-bit transfer, the image sensor sends an acknowledge bit. all 16 bits must be written before the register is updated. after 16 bits are transferred, the register address is automatically incremented so that the next 16 bits are written to the next register. the master stops writ ing by sending a start or stop bit. figure 52: write timing to r0x09:0?value 0x0284 sclk s data 0xba address start stop ack ack ack ack reg0x09 0000 0010 1000 0100 www.datasheet.co.kr datasheet pdf - http://www..net/
pdf: 09005aef8202ec2e/source: 09005aef8202ebf7 micron technology, inc., reserves the right to change products or specifications without notice. MT9D111__7_rev5.fm - rev. b 2/06 en 183 ?2004 micron technology, inc. all rights reserved. MT9D111 - 1/3.2-inch 2-megapixel soc digital image sensor appendix a: two-wire serial register interface micron confidential and proprietary 16-bit read sequence a typical read sequence is shown in figure 53. first the master writes the register address, as in a write sequence. then a start bit and the read address specify that a read is about to happen from the register. the master clocks out the register data, eight bits at a time. the master sends an acknowledge bit after each 8-bit transfer. the register address should be incremented after every 16 bits is transferred. the data transfer is stopped when the master sends a no-acknowledge bit. figure 53: read timing from r0x09:0; returned value 0x0284 8-bit write sequence to be able to write one byte at a time to th e register, a special register address is added. the 8-bit write is done by writing the upper 8 bits to the desired register, then writing the lower 8 bits to the special register address (r0xf1:0). the register is not updated until all 16 bits have been written. it is not possible to update just half of a register. in figure 54, a typical sequence for 8-bit writes is shown. th e second byte is written to the special regis- ter (r0xf1:0). figure 54: write timing to r0x09:0?value 0x0284 8-bit read sequence to read one byte at a time, the same special register address is used for the lower byte. the upper 8 bits are read from the desired register. by following this with a read from the special register (r0xf1:0), the lower 8 bits are accessed (figure 55). the master sets the no-acknowledge bits. sclk s data 0xba address start start stop ack ack ack ack nack reg0x09 0xbb address 0000 0010 1000 0100 sclk s data 0xba address 0xba address reg0xf1 1000 0100 start start stop ack ack ack ack ack ack reg0x09 0000 0010 www.datasheet.co.kr datasheet pdf - http://www..net/
pdf: 09005aef8202ec2e/source: 09005aef8202ebf7 micron technology, inc., reserves the right to change products or specifications without notice. MT9D111__7_rev5.fm - rev. b 2/06 en 184 ?2004 micron technology, inc. all rights reserved. MT9D111 - 1/3.2-inch 2-megapixel soc digital image sensor appendix a: two-wire serial register interface micron confidential and proprietary figure 55: read timing from r0x09:0; returned value 0x0284 figure 56: two-wire seria l bus timing parameters s clk s data 0xba address start start ack ack ack nack reg0x09 0xbb address 0000 0010 s clk s data 0xba address start start stop ack ack ack nack reg0xf1 0xbb address 1000 0100 ? ? ? ? t srth t sclk write start write address bit 7 ack register address bit 7 register value bit 0 stop read start ack write address bit 0 read address bit 7 read address bit 0 register value bit 7 register value bit 0 t sds t sdh t shaw t ahsw t stps t stph t shar t ahsr t sdhr t sdsr s clk s data write sequence s clk s data read sequence - read waveforms start after write command and register addres are issued and are for an 8-bit read. www.datasheet.co.kr datasheet pdf - http://www..net/
pdf: 09005aef8202ec2e/source: 09005aef8202ebf7 micron technology, inc., reserves the right to change products or specifications without notice. MT9D111__7_rev5.fm - rev. b 2/06 en 185 ?2004 micron technology, inc. all rights reserved. MT9D111 - 1/3.2-inch 2-megapixel soc digital image sensor appendix a: two-wire serial register interface micron confidential and proprietary table 46: two-wire serial bus characteristics note: either the slave or master device can drive the s clk line low?the interface protocol deter- mines which device is allowed to drive the s clk line at any given time. symbol definition conditions min typ max units f sclk serial interface input clock frequency f clk/16 khz t sclk serial interface input clock period 1/ f sclk ns s clk duty cycle 40 50 60 % t srth start hold time write/read 4* t clk ns t sdh s data hold write 4* t clk ns t sds s data setup write 4* t clk ns t shaw s data hold to ack write 4* t clk ns t ahsw ack hold to s data write 4* t clk ns t stps stop setup time write/read 4* t clk ns t stph stop hold time write/read 4* t clk ns t shar s data hold to ack read 4* t clk ns t ahsr ack hold to s data read 4* t clk ns t sdhr s data hold read 4* t clk ns t sdsr s data setup read 4* t clk ns c in _ si serial interface input pin capacitance 3.5 pf c load _ sd s data max load capacitance 15 pf r sd s data pull-up resistor 1.5 k www.datasheet.co.kr datasheet pdf - http://www..net/
pdf: 09005aef8202ec2e/source: 09005aef8202ebf7 micron technology, inc., reserves the right to change products or specifications without notice. MT9D111__7_rev5.fm - rev. b 2/06 en 186 ?2004 micron technology, inc. all rights reserved. MT9D111 - 1/3.2-inch 2-megapixel soc digital image sensor revision history micron confidential and proprietary revision history rev. b, production ............................................................................................................. ..............................................1/06 ? add table 2, "available part numbers," on page 1 ? update table 3, "signal description," on page 12 ? update table 4, "sensor core register defaults," on page 27 ? update table 10, "driver variables-monitor driver (id = 0)," on page 69 ? update table 11, "driver variables-se quencer driver (id = 1)," on page 70 ? updatetable 13, "driver variables-auto white balance (id = 3)," on page 77 ? update table 15, "driver variables-auto focus driver (id = 5)," on page 82 ? update table 16, "driver variables-auto fo cus mechanics driver (id = 6)," on page 85 ? update "changes to gain settings" on page 122 ? update"window size" on page 124 ? update "column and row skip" on page 125 ? update "context switching" on page 129 ? update "two-wire serial interface programming" on page 138 ? update "auto focus mechanics driver" on page 145 ? update "flicker avoidance driver" on page 146 ? update "power-up" on page 149 ? update "hard reset sequence" on page 149 ? add figure 33, power on/off sequence, on page 150 ? update "enable pll" on page 150 ? update "configure pad slew" on page 151 ? update "standby sequence" on page 151 ? update "to exit standby" on page 152 ? add figure 34, hard standby sequence, on page 153 ? update figure 48, typical spectral characteristics, on page 175 ? update table 46, "two-wire serial bus characteristics," on page 185 rev. a, advance................................................................................................................ ................................................7/05 ? initial release www.datasheet.co.kr datasheet pdf - http://www..net/


▲Up To Search▲   

 
Price & Availability of MT9D111

All Rights Reserved © IC-ON-LINE 2003 - 2022  

[Add Bookmark] [Contact Us] [Link exchange] [Privacy policy]
Mirror Sites :  [www.datasheet.hk]   [www.maxim4u.com]  [www.ic-on-line.cn] [www.ic-on-line.com] [www.ic-on-line.net] [www.alldatasheet.com.cn] [www.gdcy.com]  [www.gdcy.net]


 . . . . .
  We use cookies to deliver the best possible web experience and assist with our advertising efforts. By continuing to use this site, you consent to the use of cookies. For more information on cookies, please take a look at our Privacy Policy. X